static llvm::ConstantInt *ourExceptionCaughtState;
typedef std::vector<std::string> ArgNames;
-typedef std::vector<const llvm::Type*> ArgTypes;
+typedef std::vector<llvm::Type*> ArgTypes;
//
// Code Generation Utilities
ourExceptionNotThrownState);
const llvm::PointerType *exceptionStorageType =
- builder.getInt8Ty()->getPointerTo();
+ builder.getInt8Ty()->getPointerTo();
*exceptionStorage =
createEntryBlockAlloca(toAddTo,
"exceptionStorage",
llvm::Function *toPrint32Int = module.getFunction("print32Int");
ArgTypes argTypes;
- argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
ArgNames argNames;
argNames.push_back("exceptTypeToThrow");
llvm::LLVMContext &context = module.getContext();
namedValues.clear();
ArgTypes unwindArgTypes;
- unwindArgTypes.push_back(builder.getInt32Ty());
+ unwindArgTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
ArgNames unwindArgNames;
unwindArgNames.push_back("exceptTypeToThrow");
// End test functions
//
-typedef llvm::ArrayRef<const llvm::Type*> TypeArray;
+typedef llvm::ArrayRef<llvm::Type*> TypeArray;
/// This initialization routine creates type info globals and
/// adds external function declarations to module.
// Create our type info type
ourTypeInfoType = llvm::StructType::get(context,
- TypeArray(builder.getInt32Ty()));
-
+ TypeArray(llvm::Type::getInt32Ty(builder.getContext())));
// Create OurException type
ourExceptionType = llvm::StructType::get(context,
TypeArray(ourTypeInfoType));
// Note: Declaring only a portion of the _Unwind_Exception struct.
// Does this cause problems?
ourUnwindExceptionType =
- llvm::StructType::get(context, TypeArray(builder.getInt64Ty()));
+ llvm::StructType::get(context,
+ TypeArray(llvm::Type::getInt64Ty(builder.getContext())));
+
struct OurBaseException_t dummyException;
// Calculate offset of OurException::unwindException member.
const llvm::Type *retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
argTypes.push_back(builder.getInt8Ty()->getPointerTo());
argNames.clear();
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(builder.getInt64Ty());
+ argTypes.push_back(llvm::Type::getInt64Ty(builder.getContext()));
argTypes.push_back(builder.getInt8Ty()->getPointerTo());
argNames.clear();
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
argNames.clear();
retType = builder.getInt8Ty()->getPointerTo();
argTypes.clear();
- argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
argNames.clear();
retType = builder.getInt32Ty();
argTypes.clear();
- argTypes.push_back(builder.getInt32Ty());
- argTypes.push_back(builder.getInt32Ty());
- argTypes.push_back(builder.getInt64Ty());
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ argTypes.push_back(llvm::Type::getInt64Ty(builder.getContext()));
argTypes.push_back(builder.getInt8Ty()->getPointerTo());
argTypes.push_back(builder.getInt8Ty()->getPointerTo());