added LLVM_3_6 var

This commit is contained in:
Anton Mitrokhin
2014-07-30 11:50:15 +04:00
parent e044db016d
commit 725be222ac
15 changed files with 54 additions and 40 deletions

View File

@@ -63,12 +63,12 @@
#include <llvm/IR/BasicBlock.h>
#include <llvm/IR/Constants.h>
#endif
#if defined (LLVM_3_4) || defined(LLVM_3_5)
#if defined (LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
#include <llvm/Transforms/Instrumentation.h>
#endif
#include <llvm/PassManager.h>
#include <llvm/PassRegistry.h>
#if defined(LLVM_3_5)
#if defined(LLVM_3_5) || defined(LLVM_3_6)
#include <llvm/IR/Verifier.h>
#include <llvm/IR/IRPrintingPasses.h>
#include <llvm/IR/PatternMatch.h>
@@ -444,7 +444,7 @@ DebugPassManager::add(llvm::Pass * P, int stage = -1) {
number, P->getPassName());
PM.add(CreateDebugPass(buf));
}
#if defined(LLVM_3_4) || defined(LLVM_3_5)
#if defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
if (g->debugIR == number) {
// adding generating of LLVM IR debug after optimization
char buf[100];
@@ -469,7 +469,7 @@ Optimize(llvm::Module *module, int optLevel) {
new llvm::TargetLibraryInfo(llvm::Triple(module->getTargetTriple()));
optPM.add(targetLibraryInfo);
#if defined(LLVM_3_5)
#if defined(LLVM_3_5) || defined(LLVM_3_6)
optPM.add(new llvm::DataLayoutPass(*g->target->getDataLayout()));
#else
optPM.add(new llvm::DataLayout(*g->target->getDataLayout()));