From db8d2bed6a0ef890b81fabb014bfcb678e891695 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 31 Dec 2006 05:50:28 +0000 Subject: For PR950: Convert signed integer types to signless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32786 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/Fibonacci/fibonacci.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/Fibonacci/fibonacci.cpp') diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index 96aeb6340a..80b7f32226 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/examples/Fibonacci/fibonacci.cpp @@ -38,15 +38,15 @@ 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::IntTy, Type::IntTy, + Function *FibF = M->getOrInsertFunction("fib", Type::Int32Ty, Type::Int32Ty, (Type *)0); // Add a basic block to the function. BasicBlock *BB = new BasicBlock("EntryBlock", FibF); // Get pointers to the constants. - Value *One = ConstantInt::get(Type::IntTy, 1); - Value *Two = ConstantInt::get(Type::IntTy, 2); + Value *One = ConstantInt::get(Type::Int32Ty, 1); + Value *Two = ConstantInt::get(Type::Int32Ty, 2); // Get pointer to the integer argument of the add1 function... Argument *ArgX = FibF->arg_begin(); // Get the arg. @@ -111,10 +111,10 @@ int main(int argc, char **argv) { // Call the Fibonacci function with argument n: std::vector Args(1); - Args[0].IntVal = n; + Args[0].Int32Val = n; GenericValue GV = EE->runFunction(FibF, Args); // import result of execution - std::cout << "Result: " << GV.IntVal << "\n"; + std::cout << "Result: " << GV.Int32Val << "\n"; return 0; } -- cgit v1.2.3-18-g5258