Nuke the old JIT.
[oota-llvm.git] / examples / ExceptionDemo / ExceptionDemo.cpp
index 4b7023faef262e9246ab7794f908bf98a5312750..3583677b6898c3ad3ee35e16f2119d171fd1334c 100644 (file)
@@ -1964,10 +1964,8 @@ int main(int argc, char *argv[]) {
   // Build engine with JIT
   llvm::EngineBuilder factory(module);
   factory.setEngineKind(llvm::EngineKind::JIT);
-  factory.setAllocateGVsWithCode(false);
   factory.setTargetOptions(Opts);
   factory.setMCJITMemoryManager(MemMgr);
-  factory.setUseMCJIT(true);
   llvm::ExecutionEngine *executionEngine = factory.create();
 
   {
@@ -1976,7 +1974,8 @@ int main(int argc, char *argv[]) {
     // Set up the optimizer pipeline.
     // Start with registering info about how the
     // target lays out data structures.
-    fpm.add(new llvm::DataLayoutPass(*executionEngine->getDataLayout()));
+    module->setDataLayout(executionEngine->getDataLayout());
+    fpm.add(new llvm::DataLayoutPass(module));
 
     // Optimizations turned on
 #ifdef ADD_OPT_PASSES