summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index 20516a7..41f41e8 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -2005,7 +2005,8 @@ int main(int argc, char *argv[]) {
}
// If not set, exception handling will not be turned on
- llvm::JITExceptionHandling = true;
+ llvm::TargetOptions Opts;
+ Opts.JITExceptionHandling = true;
llvm::InitializeNativeTarget();
llvm::LLVMContext &context = llvm::getGlobalContext();
@@ -2018,6 +2019,7 @@ int main(int argc, char *argv[]) {
llvm::EngineBuilder factory(module);
factory.setEngineKind(llvm::EngineKind::JIT);
factory.setAllocateGVsWithCode(false);
+ factory.setTargetOptions(Opts);
llvm::ExecutionEngine *executionEngine = factory.create();
{