aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-12-07 23:58:57 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-12-07 23:58:57 +0000
commitd40e103ea5bca8a223fc8261b3322b9454e9af12 (patch)
treebbe16ad530387a7351f1e3aba9299f61832e0756 /examples
parent0c89f7fda27140445fad2fb70f3d6e616792f262 (diff)
downloadexternal_llvm-d40e103ea5bca8a223fc8261b3322b9454e9af12.zip
external_llvm-d40e103ea5bca8a223fc8261b3322b9454e9af12.tar.gz
external_llvm-d40e103ea5bca8a223fc8261b3322b9454e9af12.tar.bz2
EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146108 91177308-0d34-0410-b5e6-96231b3b80d8
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();
{