From 6a98754ebbc211958297b0d20a77e8c3261c3708 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 7 Jan 2007 07:40:09 +0000 Subject: 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 --- examples/ParallelJIT/ParallelJIT.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/ParallelJIT') diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp index 67d777049f..47f990cc22 100644 --- a/examples/ParallelJIT/ParallelJIT.cpp +++ b/examples/ParallelJIT/ParallelJIT.cpp @@ -29,13 +29,13 @@ #include 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(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 @@ static Function* createAdd1(Module* M) 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(M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty, + (Type *)0)); // Add a basic block to the function. BasicBlock *BB = new BasicBlock("EntryBlock", FibF); -- cgit v1.2.3-18-g5258