Revert "Remove support for building with LLVM 3.1"

This reverts commit d3c567503b.

Conflicts:
	opt.cpp
This commit is contained in:
Matt Pharr
2013-08-06 17:00:35 -07:00
parent ccdbddd388
commit 1276ea9844
21 changed files with 320 additions and 84 deletions

View File

@@ -46,7 +46,7 @@
#include "sym.h"
#include <map>
#include <llvm/Support/Dwarf.h>
#if defined(LLVM_3_2)
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#include <llvm/Metadata.h>
#include <llvm/Module.h>
#include <llvm/Instructions.h>
@@ -3312,7 +3312,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_2) // LLVM 3.3+
#if !defined (LLVM_3_1) && !defined (LLVM_3_2) // LLVM 3.3+
llvm::CallInst *cc = llvm::dyn_cast<llvm::CallInst>(ci);
if (cc &&
cc->getCalledFunction() &&