summaryrefslogtreecommitdiff
path: root/examples/Fibonacci
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-07 07:40:09 +0000
committerChris Lattner <sabre@nondot.org>2007-01-07 07:40:09 +0000
commit6a98754ebbc211958297b0d20a77e8c3261c3708 (patch)
tree1b28c957ff64e3e5b01a5a486d238fd4756c87e8 /examples/Fibonacci
parent52a457c7e23ef08ed31e8aba8c9a673d8aaac59b (diff)
downloadllvm-6a98754ebbc211958297b0d20a77e8c3261c3708.tar.gz
llvm-6a98754ebbc211958297b0d20a77e8c3261c3708.tar.bz2
llvm-6a98754ebbc211958297b0d20a77e8c3261c3708.tar.xz
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
Diffstat (limited to 'examples/Fibonacci')
-rw-r--r--examples/Fibonacci/fibonacci.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index 80b7f32226..53ec1b04d3 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);