diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-12-07 23:58:57 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-12-07 23:58:57 +0000 |
commit | d40e103ea5bca8a223fc8261b3322b9454e9af12 (patch) | |
tree | bbe16ad530387a7351f1e3aba9299f61832e0756 /include/llvm/ExecutionEngine/ExecutionEngine.h | |
parent | 0c89f7fda27140445fad2fb70f3d6e616792f262 (diff) |
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 'include/llvm/ExecutionEngine/ExecutionEngine.h')
-rw-r--r-- | include/llvm/ExecutionEngine/ExecutionEngine.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 2b5d61cba6..78198a9951 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -26,6 +26,7 @@ #include "llvm/Support/ValueHandle.h" #include "llvm/Support/Mutex.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" namespace llvm { @@ -462,6 +463,7 @@ private: CodeGenOpt::Level OptLevel; JITMemoryManager *JMM; bool AllocateGVsWithCode; + TargetOptions Options; Reloc::Model RelocModel; CodeModel::Model CMModel; std::string MArch; @@ -475,6 +477,7 @@ private: ErrorStr = NULL; OptLevel = CodeGenOpt::Default; JMM = NULL; + Options = TargetOptions(); AllocateGVsWithCode = false; RelocModel = Reloc::Default; CMModel = CodeModel::JITDefault; @@ -518,6 +521,13 @@ public: return *this; } + /// setTargetOptions - Set the target options that the ExecutionEngine + /// target is using. Defaults to TargetOptions(). + EngineBuilder &setTargetOptions(const TargetOptions &Opts) { + Options = Opts; + return *this; + } + /// setRelocationModel - Set the relocation model that the ExecutionEngine /// target is using. Defaults to target specific default "Reloc::Default". EngineBuilder &setRelocationModel(Reloc::Model RM) { @@ -578,6 +588,7 @@ public: StringRef MArch, StringRef MCPU, const SmallVectorImpl<std::string>& MAttrs, + const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, |