wiped out all LLVM 3.1 support

This commit is contained in:
Anton Mitrokhin
2014-08-01 14:54:08 +04:00
parent 9189bbb7d3
commit d0c9b7c9b5
29 changed files with 136 additions and 460 deletions

View File

@@ -46,7 +46,7 @@
#include "sym.h"
#include <map>
#include <llvm/Support/Dwarf.h>
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#if defined(LLVM_3_2)
#include <llvm/Metadata.h>
#include <llvm/Module.h>
#include <llvm/Instructions.h>
@@ -336,7 +336,7 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym,
diFile = funcStartPos.GetDIFile();
AssertPos(currentPos, diFile.Verify());
#if defined(LLVM_3_1) || defined(LLVM_3_2) || defined(LLVM_3_3)
#if defined(LLVM_3_2) || defined(LLVM_3_3)
llvm::DIScope scope = llvm::DIScope(m->diBuilder->getCU());
#else // LLVM_3_4+
llvm::DIScope scope = llvm::DIScope(m->diCompileUnit);
@@ -352,7 +352,7 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym,
AssertPos(currentPos, diSubprogramType.Verify());
}
#if defined(LLVM_3_4) || defined(LLVM_3_5) || defined(LLVM_3_6)
#if !defined(LLVM_3_2) && !defined(LLVM_3_3)
Assert(diSubprogramType.isCompositeType());
llvm::DICompositeType diSubprogramType_n =
static_cast<llvm::DICompositeType>(diSubprogramType);
@@ -3339,7 +3339,7 @@ FunctionEmitContext::CallInst(llvm::Value *func, const FunctionType *funcType,
// alias analysis.
// TODO: what other attributes needs to be copied?
// TODO: do the same for varing path.
#if !defined (LLVM_3_1) && !defined (LLVM_3_2) // LLVM 3.3+
#if !defined (LLVM_3_2) // LLVM 3.3+
llvm::CallInst *cc = llvm::dyn_cast<llvm::CallInst>(ci);
if (cc &&
cc->getCalledFunction() &&