diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-07 07:40:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-07 07:40:09 +0000 |
commit | b800b3921c86cba2d870ffc8daffc30492255ef3 (patch) | |
tree | 38fd237d97621fda1de0aa5947f731e5a8be4938 /llvm/examples/Fibonacci/fibonacci.cpp | |
parent | f7eef61f208285067864d59e92f8cc48f1717112 (diff) | |
download | llvm-b800b3921c86cba2d870ffc8daffc30492255ef3.zip llvm-b800b3921c86cba2d870ffc8daffc30492255ef3.tar.gz llvm-b800b3921c86cba2d870ffc8daffc30492255ef3.tar.bz2 |
add some casts to support a change in the getOrInsertFunction interface
llvm-svn: 32984
Diffstat (limited to 'llvm/examples/Fibonacci/fibonacci.cpp')
-rw-r--r-- | llvm/examples/Fibonacci/fibonacci.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/examples/Fibonacci/fibonacci.cpp b/llvm/examples/Fibonacci/fibonacci.cpp index 80b7f32..53ec1b0 100644 --- a/llvm/examples/Fibonacci/fibonacci.cpp +++ b/llvm/examples/Fibonacci/fibonacci.cpp @@ -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); |