diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:52:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:52:09 +0000 |
commit | 6b8eb8cd71c3753ab8d87d1da442be5d7480f4bb (patch) | |
tree | 780c0fd8e05c7db23eeb01cd375b6025e4e58e7a /llvm/examples | |
parent | 2192fe50dac0e0333f013a025619faf5a574c7d4 (diff) | |
download | bcm5719-llvm-6b8eb8cd71c3753ab8d87d1da442be5d7480f4bb.tar.gz bcm5719-llvm-6b8eb8cd71c3753ab8d87d1da442be5d7480f4bb.zip |
update this to build with a recent IRBuilder change and de-constify types.
llvm-svn: 135373
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/ExceptionDemo/ExceptionDemo.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp index e5d94514464..ed26d729504 100644 --- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp @@ -209,7 +209,7 @@ typedef std::vector<llvm::Type*> ArgTypes; /// @param isVarArg function uses vararg arguments /// @returns function instance llvm::Function *createFunction(llvm::Module &module, - const llvm::Type *retType, + llvm::Type *retType, const ArgTypes &theArgTypes, const ArgNames &theArgNames, const std::string &functName, @@ -246,7 +246,7 @@ llvm::Function *createFunction(llvm::Module &module, /// @returns AllocaInst instance static llvm::AllocaInst *createEntryBlockAlloca(llvm::Function &function, const std::string &varName, - const llvm::Type *type, + llvm::Type *type, llvm::Constant *initWith = 0) { llvm::BasicBlock &block = function.getEntryBlock(); llvm::IRBuilder<> tmp(&block, block.begin()); @@ -986,8 +986,7 @@ static llvm::BasicBlock *createFinallyBlock(llvm::LLVMContext &context, ourExceptionNotThrownState->getType(), ourExceptionNotThrownState); - const llvm::PointerType *exceptionStorageType = - builder.getInt8PtrTy(); + llvm::PointerType *exceptionStorageType = builder.getInt8PtrTy(); *exceptionStorage = createEntryBlockAlloca(toAddTo, "exceptionStorage", @@ -1181,8 +1180,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module, builder.CreateInvoke(&toInvoke, normalBlock, exceptionBlock, - args.begin(), - args.end()); + args); // End Block @@ -1263,9 +1261,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module, // handles this call. This landing pad (this exception block), will be // called either because it nees to cleanup (call finally) or a type // info was found which matched the thrown exception. - llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector, - args.begin(), - args.end()); + llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector, args); // Retrieve exception_class member from thrown exception // (_Unwind_Exception instance). This member tells us whether or not @@ -1724,7 +1720,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos, // print32Int - const llvm::Type *retType = builder.getVoidTy(); + llvm::Type *retType = builder.getVoidTy(); argTypes.clear(); argTypes.push_back(builder.getInt32Ty()); |