ldc/driver/cl_options-llvm.h
Martin Kinkelin e7091dd0c7 Drop support for LLVM < 14
LLVM 14 is the first version supporting both new pass manager and
opaque IR pointers.
2024-05-12 03:53:03 +02:00

46 lines
1.2 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//===-- driver/cl_options-llvm.h - LLVM command line options ----*- C++ -*-===//
//
// LDC the LLVM D compiler
//
// This file is distributed under the BSD-style LDC license. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
#pragma once
#if LDC_LLVM_VER < 1700
#include "llvm/ADT/Optional.h"
#else
#include <optional>
namespace llvm {
template <typename T> using Optional = std::optional<T>;
}
#endif
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Target/TargetOptions.h"
namespace llvm {
class Function;
class Triple;
}
namespace opts {
std::string getArchStr();
llvm::Optional<llvm::Reloc::Model> getRelocModel();
llvm::Optional<llvm::CodeModel::Model> getCodeModel();
llvm::Optional<llvm::FramePointerKind> framePointerUsage();
bool disableRedZone();
bool printTargetFeaturesHelp();
llvm::TargetOptions
InitTargetOptionsFromCodeGenFlags(const llvm::Triple &triple);
std::string getCPUStr();
std::string getFeaturesStr();
void setFunctionAttributes(llvm::StringRef cpu, llvm::StringRef features,
llvm::Function &function);
}