reversed macros LLVM_3_6 to LLVM_3_5+ in .cpp and .h files

This commit is contained in:
Anton Mitrokhin
2014-08-01 15:40:48 +04:00
parent d0c9b7c9b5
commit 60fa76ccc1
11 changed files with 33 additions and 24 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) || defined(LLVM_3_6)
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) // LLVM 3.4+
#include <llvm/Transforms/Instrumentation.h>
#endif
#include <llvm/PassManager.h>
#include <llvm/PassRegistry.h>
#if defined(LLVM_3_5) || defined(LLVM_3_6)
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) // LLVM 3.5+
#include <llvm/IR/Verifier.h>
#include <llvm/IR/IRPrintingPasses.h>
#include <llvm/IR/PatternMatch.h>
@@ -444,7 +444,8 @@ DebugPassManager::add(llvm::Pass * P, int stage = -1) {
number, P->getPassName());
PM.add(CreateDebugPass(buf));
}
#if defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) // LLVM 3.4+
if (g->debugIR == number) {
// adding generating of LLVM IR debug after optimization
char buf[100];
@@ -469,7 +470,7 @@ Optimize(llvm::Module *module, int optLevel) {
new llvm::TargetLibraryInfo(llvm::Triple(module->getTargetTriple()));
optPM.add(targetLibraryInfo);
#if defined(LLVM_3_5) || defined(LLVM_3_6)
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) // LLVM 3.5+
optPM.add(new llvm::DataLayoutPass(*g->target->getDataLayout()));
#else
optPM.add(new llvm::DataLayout(*g->target->getDataLayout()));