llvm.org GIT mirror llvm / 77613d4
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 Chris Lattner 8 years ago
1 changed file(s) with 6 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
208208 /// @param isVarArg function uses vararg arguments
209209 /// @returns function instance
210210 llvm::Function *createFunction(llvm::Module &module,
211 const llvm::Type *retType,
211 llvm::Type *retType,
212212 const ArgTypes &theArgTypes,
213213 const ArgNames &theArgNames,
214214 const std::string &functName,
245245 /// @returns AllocaInst instance
246246 static llvm::AllocaInst *createEntryBlockAlloca(llvm::Function &function,
247247 const std::string &varName,
248 const llvm::Type *type,
248 llvm::Type *type,
249249 llvm::Constant *initWith = 0) {
250250 llvm::BasicBlock &block = function.getEntryBlock();
251251 llvm::IRBuilder<> tmp(&block, block.begin());
985985 ourExceptionNotThrownState->getType(),
986986 ourExceptionNotThrownState);
987987
988 const llvm::PointerType *exceptionStorageType =
989 builder.getInt8PtrTy();
988 llvm::PointerType *exceptionStorageType = builder.getInt8PtrTy();
990989 *exceptionStorage =
991990 createEntryBlockAlloca(toAddTo,
992991 "exceptionStorage",
11801179 builder.CreateInvoke(&toInvoke,
11811180 normalBlock,
11821181 exceptionBlock,
1183 args.begin(),
1184 args.end());
1182 args);
11851183
11861184 // End Block
11871185
12621260 // handles this call. This landing pad (this exception block), will be
12631261 // called either because it nees to cleanup (call finally) or a type
12641262 // info was found which matched the thrown exception.
1265 llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector,
1266 args.begin(),
1267 args.end());
1263 llvm::Value *retTypeInfoIndex = builder.CreateCall(ehSelector, args);
12681264
12691265 // Retrieve exception_class member from thrown exception
12701266 // (_Unwind_Exception instance). This member tells us whether or not
17231719
17241720 // print32Int
17251721
1726 const llvm::Type *retType = builder.getVoidTy();
1722 llvm::Type *retType = builder.getVoidTy();
17271723
17281724 argTypes.clear();
17291725 argTypes.push_back(builder.getInt32Ty());