Fix the build with LLVM 3.3 and enable building the optimisation passes by

default of LLVM 3.3 is found.
main
theraven 13 years ago
parent 383ccff079
commit 3b44e6f97a

@ -130,7 +130,7 @@ if (DEFAULT_ENABLE_LLVM)
set(DEFAULT_ENABLE_LLVM FALSE)
message(STATUS "svn version of LLVM found.")
message(STATUS "Disabling LLVM options unless explicitly enabled.")
elseif (LLVM_VER VERSION_GREATER 3.2)
elseif (LLVM_VER VERSION_GREATER 3.3)
set(DEFAULT_ENABLE_LLVM FALSE)
message(STATUS "Untested version of LLVM (${LLVM_VER}) found.")
message(STATUS "Disabling LLVM options unless explicitly enabled.")

@ -14,7 +14,7 @@ namespace
{
class ClassIMPCachePass : public ModulePass
{
LLVMIntegerType *IntTy;
LLVMIntegerTy *IntTy;
public:
static char ID;

@ -25,9 +25,9 @@ namespace GNUstep
MDNode *AlreadyCachedFlag;
unsigned IMPCacheFlagKind;
Pass *Owner;
LLVMPointerType *PtrTy;
LLVMPointerType *IdTy;
LLVMIntegerType *IntTy;
LLVMPointerTy *PtrTy;
LLVMPointerTy *IdTy;
LLVMIntegerTy *IntTy;
public:
IMPCacher(LLVMContext &C, Pass *owner);
void CacheLookup(Instruction *lookup, Value *slot, Value *version, bool

@ -157,16 +157,16 @@ llvm::Constant* GetConstantStruct(llvm::LLVMContext &C, const std::vector<llvm::
#if LLVM_MAJOR < 3
typedef const llvm::Type LLVMType;
typedef const llvm::StructType LLVMStructType;
typedef const llvm::ArrayType LLVMArrayType;
typedef const llvm::PointerType LLVMPointerType;
typedef const llvm::IntegerType LLVMIntegerType;
typedef const llvm::StructType LLVMStructTy;
typedef const llvm::ArrayType LLVMArrayTy;
typedef const llvm::PointerType LLVMPointerTy;
typedef const llvm::IntegerType LLVMIntegerTy;
#else
typedef llvm::Type LLVMType;
typedef llvm::StructType LLVMStructType;
typedef llvm::ArrayType LLVMArrayType;
typedef llvm::PointerType LLVMPointerType;
typedef llvm::IntegerType LLVMIntegerType;
typedef llvm::StructType LLVMStructTy;
typedef llvm::ArrayType LLVMArrayTy;
typedef llvm::PointerType LLVMPointerTy;
typedef llvm::IntegerType LLVMIntegerTy;
#endif
#endif

@ -14,7 +14,7 @@ namespace
class GNULoopIMPCachePass : public FunctionPass
{
GNUstep::IMPCacher *cacher;
LLVMIntegerType *IntTy;
LLVMIntegerTy *IntTy;
Module *M;
bool skip;
Function *sendFn;

@ -12,7 +12,7 @@ namespace {
typedef std::vector<callPair > replacementVector;
static char ID;
uint32_t callsiteCount;
LLVMIntegerType *Int32Ty;
LLVMIntegerTy *Int32Ty;
GNUObjCTypeFeedback() : ModulePass(ID), callsiteCount(0) {}
void profileFunction(Function &F, Constant *ModuleID) {
@ -47,7 +47,7 @@ namespace {
{
LLVMContext &VMContext = M.getContext();
Int32Ty = IntegerType::get(VMContext, 32);
LLVMPointerType *PtrTy = Type::getInt8PtrTy(VMContext);
LLVMPointerTy *PtrTy = Type::getInt8PtrTy(VMContext);
Constant *moduleName =
#if (LLVM_MAJOR > 3) || ((LLVM_MAJOR == 3) && (LLVM_MINOR > 0))
ConstantDataArray::getString(VMContext, M.getModuleIdentifier(), true);

Loading…
Cancel
Save