X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FFibonacci%2Ffibonacci.cpp;h=8092e19380dd3f4decbe068f7cd2aaa76a4386ab;hb=417c5c172ce0d56105112481b1bcf0bc2fc011c2;hp=417ad6f4b60257844c0a7204549856592c0a2223;hpb=92b0d8cf2c51debc7f4fb30a417ae839077a8ed0;p=oota-llvm.git diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp index 417ad6f4b60..8092e19380d 100644 --- a/examples/Fibonacci/fibonacci.cpp +++ b/examples/Fibonacci/fibonacci.cpp @@ -23,17 +23,16 @@ // //===----------------------------------------------------------------------===// -#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/IR/Verifier.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/ExecutionEngine/Interpreter.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) { @@ -96,15 +95,16 @@ int main(int argc, char **argv) { LLVMContext Context; // Create some module to put our function into it. - OwningPtr M(new Module("test", Context)); + std::unique_ptr Owner(new Module("test", Context)); + Module *M = Owner.get(); // We are about to create the "fib" function: - Function *FibF = CreateFibFunction(M.get(), Context); + Function *FibF = CreateFibFunction(M, Context); // Now we going to create JIT std::string errStr; ExecutionEngine *EE = - EngineBuilder(M.get()) + EngineBuilder(std::move(Owner)) .setErrorStr(&errStr) .setEngineKind(EngineKind::JIT) .create();