Bump minimum required LLVM version to 6.0
This commit is contained in:
parent
b7da2c6e12
commit
706e67b0a0
19 changed files with 14 additions and 65 deletions
|
@ -17,21 +17,15 @@
|
|||
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
||||
#include "llvm/IR/AutoUpgrade.h"
|
||||
#include "llvm/IR/AssemblyAnnotationWriter.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/Support/CBindingWrapping.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
||||
|
||||
#if LLVM_VERSION_GE(6, 0)
|
||||
#include "llvm/CodeGen/TargetSubtargetInfo.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#else
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#endif
|
||||
|
||||
#include "llvm/Transforms/IPO/AlwaysInliner.h"
|
||||
#include "llvm/Transforms/IPO/FunctionImport.h"
|
||||
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
|
||||
|
@ -198,13 +192,9 @@ GEN_SUBTARGETS
|
|||
|
||||
extern "C" bool LLVMRustHasFeature(LLVMTargetMachineRef TM,
|
||||
const char *Feature) {
|
||||
#if LLVM_VERSION_GE(6, 0)
|
||||
TargetMachine *Target = unwrap(TM);
|
||||
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
|
||||
return MCInfo->checkFeatures(std::string("+") + Feature);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
enum class LLVMRustCodeModel {
|
||||
|
@ -392,13 +382,9 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
|||
Options.ThreadModel = ThreadModel::Single;
|
||||
}
|
||||
|
||||
#if LLVM_VERSION_GE(6, 0)
|
||||
Options.EmitStackSizeSection = EmitStackSizeSection;
|
||||
|
||||
Optional<CodeModel::Model> CM;
|
||||
#else
|
||||
CodeModel::Model CM = CodeModel::Model::Default;
|
||||
#endif
|
||||
if (RustCM != LLVMRustCodeModel::None)
|
||||
CM = fromRust(RustCM);
|
||||
TargetMachine *TM = TheTarget->createTargetMachine(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue