summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-06-16 21:55:52 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-06-16 21:55:52 +0000
commite04690e092fdc4d27a8642775892293f4ae6ede3 (patch)
tree57aab30b24e22d9f315bb5c27dd728f8f8464975 /lib/ExecutionEngine/JIT/JITEmitter.cpp
parenta9783663398baf1289683fc7326430b89963f38e (diff)
downloadllvm-e04690e092fdc4d27a8642775892293f4ae6ede3.tar.gz
llvm-e04690e092fdc4d27a8642775892293f4ae6ede3.tar.bz2
llvm-e04690e092fdc4d27a8642775892293f4ae6ede3.tar.xz
Disable the right instance of TheJIT, this one is only used in asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 5427eec4df..0d108848b2 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -108,13 +108,18 @@ namespace {
/// particular GlobalVariable so that we can reuse them if necessary.
GlobalToIndirectSymMapTy GlobalToIndirectSymMap;
+#ifndef NDEBUG
/// Instance of the JIT this ResolverState serves.
JIT *TheJIT;
+#endif
public:
JITResolverState(JIT *jit) : FunctionToLazyStubMap(this),
- FunctionToCallSitesMap(this),
- TheJIT(jit) {}
+ FunctionToCallSitesMap(this) {
+#ifndef NDEBUG
+ TheJIT = jit;
+#endif
+ }
FunctionToLazyStubMapTy& getFunctionToLazyStubMap(
const MutexGuard& locked) {
@@ -186,17 +191,12 @@ namespace {
JITEmitter &JE;
-#ifndef NDEBUG
/// Instance of JIT corresponding to this Resolver.
JIT *TheJIT;
-#endif
public:
explicit JITResolver(JIT &jit, JITEmitter &je)
- : state(&jit), nextGOTIndex(0), JE(je) {
-#ifndef NDEBUG
- TheJIT = &jit;
-#endif
+ : state(&jit), nextGOTIndex(0), JE(je), TheJIT(&jit) {
LazyResolverFn = jit.getJITInfo().getLazyResolverFunction(JITCompilerFn);
}