Changes in directory llvm/examples/HowToUseJIT:
HowToUseJIT.cpp updated: 1.13 -> 1.14 --- Log message: add some casts to support a change in the getOrInsertFunction interface --- Diffs of the changes: (+5 -3) HowToUseJIT.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/examples/HowToUseJIT/HowToUseJIT.cpp diff -u llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.13 llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.14 --- llvm/examples/HowToUseJIT/HowToUseJIT.cpp:1.13 Sat Dec 30 23:50:28 2006 +++ llvm/examples/HowToUseJIT/HowToUseJIT.cpp Sun Jan 7 01:40:09 2007 @@ -52,8 +52,9 @@ // 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. @@ -78,7 +79,8 @@ // Now we going to create function `foo', which returns an int and takes no // arguments. - Function *FooF = M->getOrInsertFunction("foo", Type::Int32Ty, (Type *)0); + Function *FooF = + cast<Function>(M->getOrInsertFunction("foo", Type::Int32Ty, (Type *)0)); // Add a basic block to the FooF function. BB = new BasicBlock("EntryBlock", FooF); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits