ldc/driver/cl_options-llvm.h
2023-12-03 19:07:31 +01:00

50 lines
1.3 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();
#if LDC_LLVM_VER >= 1300
llvm::Optional<llvm::FramePointerKind> framePointerUsage();
#else
llvm::Optional<llvm::FramePointer::FP> framePointerUsage();
#endif
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);
}