For PR950:
[oota-llvm.git] / examples / Fibonacci / fibonacci.cpp
index af17d094c309754c6a80cb927845dc004e6995de..6f775515fba263be92e5e740361e910c137040be 100644 (file)
@@ -29,7 +29,8 @@
 #include "llvm/Instructions.h"
 #include "llvm/ModuleProvider.h"
 #include "llvm/Analysis/Verifier.h"
-#include "llvm/ExecutionEngine/ExecutionEngine.h"
+#include "llvm/ExecutionEngine/JIT.h"
+#include "llvm/ExecutionEngine/Interpreter.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include <iostream>
 using namespace llvm;
@@ -37,14 +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, 0);
+  Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy,
+                                          (Type *)0);
 
   // Add a basic block to the function.
   BasicBlock *BB = new BasicBlock("EntryBlock", FibF);
 
   // Get pointers to the constants.
-  Value *One = ConstantSInt::get(Type::IntTy, 1);
-  Value *Two = ConstantSInt::get(Type::IntTy, 2);
+  Value *One = ConstantInt::get(Type::IntTy, 1);
+  Value *Two = ConstantInt::get(Type::IntTy, 2);
 
   // Get pointer to the integer argument of the add1 function...
   Argument *ArgX = FibF->arg_begin();   // Get the arg.