X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=examples%2FFibonacci%2Ffibonacci.cpp;h=8cbf7d159fc5d2791ee52128e36179aad1b18ee4;hp=a7d1ca8ff6a29219bb122e73ebca7ed994960e07;hb=0a08460599eed603e469e3e16d0cf6aa33b8ba93;hpb=3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3 diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index a7d1ca8ff6a..8cbf7d159fc 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/examples/Fibonacci/fibonacci.cpp @@ -23,24 +23,24 @@ // //===----------------------------------------------------------------------===// -#include "llvm/LLVMContext.h" -#include "llvm/Module.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Constants.h" -#include "llvm/Instructions.h" #include "llvm/Analysis/Verifier.h" -#include "llvm/ExecutionEngine/JIT.h" -#include "llvm/ExecutionEngine/Interpreter.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/ExecutionEngine/Interpreter.h" +#include "llvm/ExecutionEngine/JIT.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DerivedTypes.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Module.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; static Function *CreateFibFunction(Module *M, LLVMContext &Context) { - // Create the fib function and insert it into module M. This function is said + // 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 = - cast(M->getOrInsertFunction("fib", Type::getInt32Ty(Context), + cast(M->getOrInsertFunction("fib", Type::getInt32Ty(Context), Type::getInt32Ty(Context), (Type *)0)); @@ -94,7 +94,7 @@ int main(int argc, char **argv) { InitializeNativeTarget(); LLVMContext Context; - + // Create some module to put our function into it. OwningPtr M(new Module("test", Context)); @@ -132,6 +132,6 @@ int main(int argc, char **argv) { // import result of execution outs() << "Result: " << GV.IntVal << "\n"; - + return 0; }