aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-05-31 21:26:17 +0000
committerAlp Toker <alp@nuanti.com>2014-05-31 21:26:17 +0000
commit322db9ea39a8e7eff225828d9c10091e5d8ffe16 (patch)
tree77363bca851691e704c72a19d713dacfbb89d667 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parent5f83e477c30c9a2ddb60b4994fe7dae05de0aef8 (diff)
downloadllvm-322db9ea39a8e7eff225828d9c10091e5d8ffe16.zip
llvm-322db9ea39a8e7eff225828d9c10091e5d8ffe16.tar.gz
llvm-322db9ea39a8e7eff225828d9c10091e5d8ffe16.tar.bz2
ExecutionEngine: avoid NDEBUG in headers
llvm-svn: 209981
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 6766ef1..4c62336 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -457,6 +457,27 @@ ExecutionEngine *ExecutionEngine::createJIT(Module *M,
return ExecutionEngine::JITCtor(M, ErrorStr, JMM, GVsWithCode, TM);
}
+void EngineBuilder::InitEngine() {
+ WhichEngine = EngineKind::Either;
+ ErrorStr = nullptr;
+ OptLevel = CodeGenOpt::Default;
+ MCJMM = nullptr;
+ JMM = nullptr;
+ Options = TargetOptions();
+ AllocateGVsWithCode = false;
+ RelocModel = Reloc::Default;
+ CMModel = CodeModel::JITDefault;
+ UseMCJIT = false;
+
+// IR module verification is enabled by default in debug builds, and disabled
+// by default in release builds.
+#ifndef NDEBUG
+ VerifyModules = true;
+#else
+ VerifyModules = false;
+#endif
+}
+
ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
std::unique_ptr<TargetMachine> TheTM(TM); // Take ownership.