[MCJIT] Move get-any-symbol-load-address logic out of RuntimeDyld and into
authorLang Hames <lhames@gmail.com>
Thu, 27 Nov 2014 00:12:28 +0000 (00:12 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 27 Nov 2014 00:12:28 +0000 (00:12 +0000)
RuntimeDyldChecker.

RuntimeDyld instances should only provide lookup for locally defined
symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222859 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h

index 8818349..1e14633 100644 (file)
@@ -740,7 +740,9 @@ uint64_t RuntimeDyldCheckerImpl::getSymbolLinkerAddr(StringRef Symbol) const {
 }
 
 uint64_t RuntimeDyldCheckerImpl::getSymbolRemoteAddr(StringRef Symbol) const {
 }
 
 uint64_t RuntimeDyldCheckerImpl::getSymbolRemoteAddr(StringRef Symbol) const {
-  return getRTDyld().getAnySymbolRemoteAddress(Symbol);
+  if (uint64_t InternalSymbolAddr = getRTDyld().getSymbolLoadAddress(Symbol))
+      return InternalSymbolAddr;
+  return getRTDyld().MemMgr->getSymbolAddress(Symbol);
 }
 
 uint64_t RuntimeDyldCheckerImpl::readMemoryAtAddr(uint64_t SrcAddr,
 }
 
 uint64_t RuntimeDyldCheckerImpl::readMemoryAtAddr(uint64_t SrcAddr,
index 22d3940..cf7dbb2 100644 (file)
@@ -159,14 +159,6 @@ public:
 class RuntimeDyldImpl {
   friend class RuntimeDyld::LoadedObjectInfo;
   friend class RuntimeDyldCheckerImpl;
 class RuntimeDyldImpl {
   friend class RuntimeDyld::LoadedObjectInfo;
   friend class RuntimeDyldCheckerImpl;
-private:
-
-  uint64_t getAnySymbolRemoteAddress(StringRef Symbol) {
-    if (uint64_t InternalSymbolAddr = getSymbolLoadAddress(Symbol))
-      return InternalSymbolAddr;
-    return MemMgr->getSymbolAddress(Symbol);
-  }
-
 protected:
   // The MemoryManager to load objects into.
   RTDyldMemoryManager *MemMgr;
 protected:
   // The MemoryManager to load objects into.
   RTDyldMemoryManager *MemMgr;