aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples/Fibonacci/fibonacci.cpp
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
commitb800b3921c86cba2d870ffc8daffc30492255ef3 (patch)
tree38fd237d97621fda1de0aa5947f731e5a8be4938 /llvm/examples/Fibonacci/fibonacci.cpp
parentf7eef61f208285067864d59e92f8cc48f1717112 (diff)
downloadllvm-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.cpp5
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);