add some casts to support a change in the getOrInsertFunction interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-01-07 07:40:09 +00:00
parent 52a457c7e2
commit 6a98754ebb
3 changed files with 16 additions and 13 deletions

View File

@ -38,8 +38,9 @@ using namespace llvm;
static Function *CreateFibFunction(Module *M) {
// Create the fib function and insert it into module M. This function is said
// to return an int and take an int parameter.
Function *FibF = M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty,
(Type *)0);
Function *FibF =
cast<Function>(M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty,
(Type *)0));
// Add a basic block to the function.
BasicBlock *BB = new BasicBlock("EntryBlock", FibF);