[llvm-commits] CVS: llvm/examples/ParallelJIT/ParallelJIT.cpp
Chris Lattner
sabre at nondot.org
Sat Jan 6 23:40:28 PST 2007
Changes in directory llvm/examples/ParallelJIT:
ParallelJIT.cpp updated: 1.8 -> 1.9
---
Log message:
add some casts to support a change in the getOrInsertFunction interface
---
Diffs of the changes: (+8 -8)
ParallelJIT.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm/examples/ParallelJIT/ParallelJIT.cpp
diff -u llvm/examples/ParallelJIT/ParallelJIT.cpp:1.8 llvm/examples/ParallelJIT/ParallelJIT.cpp:1.9
--- llvm/examples/ParallelJIT/ParallelJIT.cpp:1.8 Sat Dec 30 23:50:28 2006
+++ llvm/examples/ParallelJIT/ParallelJIT.cpp Sun Jan 7 01:40:09 2007
@@ -29,13 +29,13 @@
#include <iostream>
using namespace llvm;
-static Function* createAdd1(Module* M)
-{
+static Function* createAdd1(Module *M) {
// Create the add1 function entry and insert this entry into module M. The
// function will have a return type of "int" and take an argument of "int".
// The '0' terminates the list of argument types.
- Function *Add1F = M->getOrInsertFunction("add1", Type::Int32Ty, Type::Int32Ty,
- (Type *)0);
+ Function *Add1F =
+ cast<Function>(M->getOrInsertFunction("add1", Type::Int32Ty, Type::Int32Ty,
+ (Type *)0));
// Add a basic block to the function. As before, it automatically inserts
// because of the last argument.
@@ -59,12 +59,12 @@
return Add1F;
}
-static Function *CreateFibFunction(Module *M)
-{
+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