Fixed LLVM trunk compatibility

This commit is contained in:
Andrey Guskov
2015-01-26 16:36:19 +03:00
parent d359503ad8
commit 3f13af8e62

View File

@@ -505,12 +505,12 @@ Optimize(llvm::Module *module, int optLevel) {
DebugPassManager optPM;
optPM.add(llvm::createVerifierPass(),0);
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
llvm::TargetLibraryInfo *targetLibraryInfo =
new llvm::TargetLibraryInfo(llvm::Triple(module->getTargetTriple()));
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
optPM.add(targetLibraryInfo);
#else // LLVM 3.7+
optPM.add(new llvm::TargetLibraryInfoWrapperPass(*targetLibraryInfo));
optPM.add(new llvm::TargetLibraryInfoWrapperPass(llvm::Triple(module->getTargetTriple())));
#endif
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4)