add some casts to support a change in the getOrInsertFunction interface

llvm-svn: 32984
This commit is contained in:
Chris Lattner
2007-01-07 07:40:09 +00:00
parent f7eef61f20
commit b800b3921c
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);