Nuke the old JIT.
[oota-llvm.git] / examples / Kaleidoscope / MCJIT / cached / toy.cpp
index 52fa3c5b7ba96d18a24043e1399488a175561d53..af51b4a8314cc03119fb26b823c510fa85432c65 100644 (file)
@@ -1,7 +1,6 @@
 #define MINIMAL_STDERR_OUTPUT
 
 #include "llvm/Analysis/Passes.h"
-#include "llvm/IR/Verifier.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/MCJIT.h"
 #include "llvm/ExecutionEngine/ObjectCache.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
+#include "llvm/IR/Verifier.h"
 #include "llvm/IRReader/IRReader.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/TargetSelect.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Scalar.h"
 #include <cctype>
 #include <cstdio>
@@ -715,7 +715,7 @@ public:
         // This file isn't in our cache
         return NULL;
       }
-      OwningPtr<MemoryBuffer> IRObjectBuffer;
+      std::unique_ptr<MemoryBuffer> IRObjectBuffer;
       MemoryBuffer::getFile(IRCacheFile.c_str(), IRObjectBuffer, -1, false);
       // MCJIT will want to write into this buffer, and we don't want that
       // because the file has probably just been mmapped.  Instead we make
@@ -897,7 +897,6 @@ ExecutionEngine *MCJITHelper::compileModule(Module *M) {
   std::string ErrStr;
   ExecutionEngine *NewEngine = EngineBuilder(M)
                                             .setErrorStr(&ErrStr)
-                                            .setUseMCJIT(true)
                                             .setMCJITMemoryManager(new HelpingMemoryManager(this))
                                             .create();
   if (!NewEngine) {