Fix compile errors for LLVM 3.8

This commit is contained in:
Magnus Norddahl 2016-11-30 17:37:32 +01:00
parent 3872e39afc
commit fdbf2ab5e9
1 changed files with 2 additions and 2 deletions

View File

@ -468,7 +468,7 @@ std::vector<uint8_t> LLVMProgram::GenerateObjectFile(const std::string &triple,
const Target *target = TargetRegistry::lookupTarget(triple, errorstring);
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 8)
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 9)
Reloc::Model relocationModel = Reloc::PIC_;
#else
Optional<Reloc::Model> relocationModel = Reloc::PIC_;
@ -502,7 +502,7 @@ std::vector<uint8_t> LLVMProgram::GenerateObjectFile(const std::string &triple,
options.MCOptions.MCUseDwarfDirectory = false;
options.MCOptions.AsmVerbose = true;
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 8)
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 9)
options.Reciprocals = TargetRecip({ "all" });
options.StackSymbolOrdering = true;
options.UniqueSectionNames = true;