mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
update this to build with a recent IRBuilder change and de-constify types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -209,7 +209,7 @@ typedef std::vector<llvm::Type*> ArgTypes;
|
|||||||
/// @param isVarArg function uses vararg arguments
|
/// @param isVarArg function uses vararg arguments
|
||||||
/// @returns function instance
|
/// @returns function instance
|
||||||
llvm::Function *createFunction(llvm::Module &module,
|
llvm::Function *createFunction(llvm::Module &module,
|
||||||
const llvm::Type *retType,
|
llvm::Type *retType,
|
||||||
const ArgTypes &theArgTypes,
|
const ArgTypes &theArgTypes,
|
||||||
const ArgNames &theArgNames,
|
const ArgNames &theArgNames,
|
||||||
const std::string &functName,
|
const std::string &functName,
|
||||||
@@ -246,7 +246,7 @@ llvm::Function *createFunction(llvm::Module &module,
|
|||||||
/// @returns AllocaInst instance
|
/// @returns AllocaInst instance
|
||||||
static llvm::AllocaInst *createEntryBlockAlloca(llvm::Function &function,
|
static llvm::AllocaInst *createEntryBlockAlloca(llvm::Function &function,
|
||||||
const std::string &varName,
|
const std::string &varName,
|
||||||
const llvm::Type *type,
|
llvm::Type *type,
|
||||||
llvm::Constant *initWith = 0) {
|
llvm::Constant *initWith = 0) {
|
||||||
llvm::BasicBlock &block = function.getEntryBlock();
|
llvm::BasicBlock &block = function.getEntryBlock();
|
||||||
llvm::IRBuilder<> tmp(&block, block.begin());
|
llvm::IRBuilder<> tmp(&block, block.begin());
|
||||||
@@ -986,8 +986,7 @@ static llvm::BasicBlock *createFinallyBlock(llvm::LLVMContext &context,
|
|||||||
ourExceptionNotThrownState->getType(),
|
ourExceptionNotThrownState->getType(),
|
||||||
ourExceptionNotThrownState);
|
ourExceptionNotThrownState);
|
||||||
|
|
||||||
const llvm::PointerType *exceptionStorageType =
|
llvm::PointerType *exceptionStorageType = builder.getInt8PtrTy();
|
||||||
builder.getInt8PtrTy();
|
|
||||||
*exceptionStorage =
|
*exceptionStorage =
|
||||||
createEntryBlockAlloca(toAddTo,
|
createEntryBlockAlloca(toAddTo,
|
||||||
"exceptionStorage",
|
"exceptionStorage",
|
||||||
@@ -1181,8 +1180,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
|
|||||||
builder.CreateInvoke(&toInvoke,
|
builder.CreateInvoke(&toInvoke,
|
||||||
normalBlock,
|
normalBlock,
|
||||||
exceptionBlock,
|
exceptionBlock,
|
||||||
args.begin(),
|
args);
|
||||||
args.end());
|
|
||||||
|
|
||||||
// End Block
|
// End Block
|
||||||
|
|
||||||
@@ -1263,9 +1261,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
|
|||||||
// handles this call. This landing pad (this exception block), will be
|
// handles this call. This landing pad (this exception block), will be
|
||||||
// called either because it nees to cleanup (call finally) or a type
|
// called either because it nees to cleanup (call finally) or a type
|
||||||
// info was found which matched the thrown exception.
|
// info was found which matched the thrown exception.
|
||||||
llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector,
|
llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector, args);
|
||||||
args.begin(),
|
|
||||||
args.end());
|
|
||||||
|
|
||||||
// Retrieve exception_class member from thrown exception
|
// Retrieve exception_class member from thrown exception
|
||||||
// (_Unwind_Exception instance). This member tells us whether or not
|
// (_Unwind_Exception instance). This member tells us whether or not
|
||||||
@@ -1724,7 +1720,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
|
|||||||
|
|
||||||
// print32Int
|
// print32Int
|
||||||
|
|
||||||
const llvm::Type *retType = builder.getVoidTy();
|
llvm::Type *retType = builder.getVoidTy();
|
||||||
|
|
||||||
argTypes.clear();
|
argTypes.clear();
|
||||||
argTypes.push_back(builder.getInt32Ty());
|
argTypes.push_back(builder.getInt32Ty());
|
||||||
|
Reference in New Issue
Block a user