[llvm-branch-commits] [llvm-branch] r98783 - /llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp

Eric Christopher echristo at apple.com
Wed Mar 17 17:18:13 PDT 2010


Author: echristo
Date: Wed Mar 17 19:18:13 2010
New Revision: 98783

URL: http://llvm.org/viewvc/llvm-project?rev=98783&view=rev
Log:
Merge r98766 from Hermes branch.

Modified:
    llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp

Modified: llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=98783&r1=98782&r2=98783&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/ExecutionEngine/JIT/JITEmitter.cpp Wed Mar 17 19:18:13 2010
@@ -1150,16 +1150,14 @@
                        << ResultPtr << "]\n");
 
           // If the target REALLY wants a stub for this function, emit it now.
-          if (MR.mayNeedFarStub()) {
-            if (!TheJIT->areDlsymStubsEnabled()) {
-              ResultPtr = Resolver.getExternalFunctionStub(ResultPtr);
-            } else {
+          if (MR.mayNeedFarStub() && !TheJIT->areDlsymStubsEnabled()) {
+	    ResultPtr = Resolver.getExternalFunctionStub(ResultPtr);
+	  } else if (TheJIT->areDlsymStubsEnabled()) {
               void *&Stub = ExtFnStubs[MR.getExternalSymbol()];
               if (!Stub) {
                 Stub = Resolver.getExternalFunctionStub((void *)&Stub);
               }
               ResultPtr = Stub;
-            }
           }
         } else if (MR.isGlobalValue()) {
           ResultPtr = getPointerToGlobal(MR.getGlobalValue(),





More information about the llvm-branch-commits mailing list