diff options
| author | Lang Hames <lhames@gmail.com> | 2014-07-29 20:40:37 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2014-07-29 20:40:37 +0000 |
| commit | 480763f814eef6e983eb1042f6c294a1501005a5 (patch) | |
| tree | d7498666f952e599478b0b49d3b68bd56cab68d8 /llvm/lib/ExecutionEngine/RuntimeDyld | |
| parent | 24412b1420f61ad1163cbc53bae4f3eee4117b95 (diff) | |
| download | bcm5719-llvm-480763f814eef6e983eb1042f6c294a1501005a5.tar.gz bcm5719-llvm-480763f814eef6e983eb1042f6c294a1501005a5.zip | |
[MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather than
full paths for its first argument.
This allows us to remove the annoying sed lines in the test cases, and write
direct references to file names in stub_addr calls (rather than <filename>
placeholders).
llvm-svn: 214211
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
| -rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 308d80ef95e..135444f9b5b 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -13,6 +13,7 @@ #include "llvm/MC/MCDisassembler.h" #include "llvm/MC/MCInst.h" #include "llvm/Support/StringRefMemoryObject.h" +#include "llvm/Support/Path.h" #include "RuntimeDyldCheckerImpl.h" #include "RuntimeDyldImpl.h" #include <cctype> @@ -772,8 +773,9 @@ RuntimeDyldCheckerImpl::getSubsectionStartingAt(StringRef Name) const { } void RuntimeDyldCheckerImpl::registerStubMap( - StringRef FileName, unsigned SectionID, + StringRef FilePath, unsigned SectionID, const RuntimeDyldImpl::StubMap &RTDyldStubs) { + StringRef FileName = sys::path::filename(FilePath); const SectionEntry &Section = getRTDyld().Sections[SectionID]; StringRef SectionName = Section.Name; for (auto &StubMapEntry : RTDyldStubs) { diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h index 8adde62448a..b3b16da5210 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h @@ -34,7 +34,7 @@ private: uint64_t getSymbolLinkerAddr(StringRef Symbol) const; uint64_t getSymbolRemoteAddr(StringRef Symbol) const; uint64_t readMemoryAtAddr(uint64_t Addr, unsigned Size) const; - std::pair<uint64_t, std::string> getStubAddrFor(StringRef FileName, + std::pair<uint64_t, std::string> getStubAddrFor(StringRef FilePath, StringRef SectionName, StringRef Symbol, bool IsInsideLoad) const; |

