diff options
Diffstat (limited to 'examples/Fibonacci')
-rw-r--r-- | examples/Fibonacci/fibonacci.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index 80b7f32..53ec1b0 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/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); |