X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FExceptionDemo%2FExceptionDemo.cpp;h=3583677b6898c3ad3ee35e16f2119d171fd1334c;hb=875710a2fd6b3c4f814961582594bd5c1cdb493a;hp=d997cc55a9f4aba568fa22f2ed1e1d2b59c4eed1;hpb=f2ce8f78744fa246ca5666893212bd50a354fe6c;p=oota-llvm.git diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index d997cc55a9f..3583677b689 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -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::DataLayout(*executionEngine->getDataLayout())); + module->setDataLayout(executionEngine->getDataLayout()); + fpm.add(new llvm::DataLayoutPass(module)); // Optimizations turned on #ifdef ADD_OPT_PASSES