fix after 3.7 buildfail on rev.227685

This commit is contained in:
Anton Mitrokhin
2015-02-03 10:28:41 +03:00
parent ec2fc0cf0b
commit 01fb69798f

View File

@@ -528,8 +528,10 @@ Optimize(llvm::Module *module, int optLevel) {
#ifdef LLVM_3_2
optPM.add(new llvm::TargetTransformInfo(targetMachine->getScalarTargetTransformInfo(),
targetMachine->getVectorTargetTransformInfo()));
#else // LLVM 3.3+
#elif defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6) // LLVM 3.3 - 3.6
targetMachine->addAnalysisPasses(optPM.getPM());
#else // LLVM 3.7+
optPM.getPM().add(createTargetTransformInfoWrapperPass(targetMachine->getTargetIRAnalysis()));
#endif
optPM.add(llvm::createIndVarSimplifyPass());