[llvm-commits] [llvm] r158610 - /llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Jun 16 14:55:53 PDT 2012


Author: d0k
Date: Sat Jun 16 16:55:52 2012
New Revision: 158610

URL: http://llvm.org/viewvc/llvm-project?rev=158610&view=rev
Log:
Disable the right instance of TheJIT, this one is only used in asserts.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=158610&r1=158609&r2=158610&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Sat Jun 16 16:55:52 2012
@@ -108,13 +108,18 @@
     /// 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 @@
 
     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);
     }
 





More information about the llvm-commits mailing list