[llvm-commits] CVS: llvm/examples/Fibonacci/fibonacci.cpp
Chris Lattner
sabre at nondot.org
Sat Jan 6 23:40:28 PST 2007
Changes in directory llvm/examples/Fibonacci:
fibonacci.cpp updated: 1.14 -> 1.15
---
Log message:
add some casts to support a change in the getOrInsertFunction interface
---
Diffs of the changes: (+3 -2)
fibonacci.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/examples/Fibonacci/fibonacci.cpp
diff -u llvm/examples/Fibonacci/fibonacci.cpp:1.14 llvm/examples/Fibonacci/fibonacci.cpp:1.15
--- llvm/examples/Fibonacci/fibonacci.cpp:1.14 Sat Dec 30 23:50:27 2006
+++ llvm/examples/Fibonacci/fibonacci.cpp Sun Jan 7 01:40:09 2007
@@ -38,8 +38,9 @@
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);
More information about the llvm-commits
mailing list