diff options
author | Lang Hames <lhames@gmail.com> | 2014-09-05 18:00:16 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-09-05 18:00:16 +0000 |
commit | 3e930a3e83da66672274f09e340abf77dace7036 (patch) | |
tree | fee5afcfcb716248aee69480e34375c508904401 /llvm/lib/ExecutionEngine/RuntimeDyld | |
parent | 3b7f085db18e690458f9f594d31489bf75354fec (diff) | |
download | bcm5719-llvm-3e930a3e83da66672274f09e340abf77dace7036.tar.gz bcm5719-llvm-3e930a3e83da66672274f09e340abf77dace7036.zip |
[MCJIT] Const-ify the symbol lookup operations on RuntimeDyld.
llvm-svn: 217263
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 5a178763b50..06359b7f02b 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -871,13 +871,13 @@ RuntimeDyld::loadObject(std::unique_ptr<ObjectBuffer> InputBuffer) { return Dyld->loadObject(std::move(InputImage)); } -void *RuntimeDyld::getSymbolAddress(StringRef Name) { +void *RuntimeDyld::getSymbolAddress(StringRef Name) const { if (!Dyld) return nullptr; return Dyld->getSymbolAddress(Name); } -uint64_t RuntimeDyld::getSymbolLoadAddress(StringRef Name) { +uint64_t RuntimeDyld::getSymbolLoadAddress(StringRef Name) const { if (!Dyld) return 0; return Dyld->getSymbolLoadAddress(Name); diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index 53ea370196d..69ea3b4f4e6 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -249,11 +249,11 @@ protected: return true; } - uint64_t getSectionLoadAddress(unsigned SectionID) { + uint64_t getSectionLoadAddress(unsigned SectionID) const { return Sections[SectionID].LoadAddress; } - uint8_t *getSectionAddress(unsigned SectionID) { + uint8_t *getSectionAddress(unsigned SectionID) const { return (uint8_t *)Sections[SectionID].Address; } @@ -376,7 +376,7 @@ public: std::unique_ptr<ObjectImage> loadObject(std::unique_ptr<ObjectImage> InputObject); - uint8_t* getSymbolAddress(StringRef Name) { + uint8_t* getSymbolAddress(StringRef Name) const { // FIXME: Just look up as a function for now. Overly simple of course. // Work in progress. SymbolTableMap::const_iterator pos = GlobalSymbolTable.find(Name); @@ -386,7 +386,7 @@ public: return getSectionAddress(Loc.first) + Loc.second; } - uint64_t getSymbolLoadAddress(StringRef Name) { + uint64_t getSymbolLoadAddress(StringRef Name) const { // FIXME: Just look up as a function for now. Overly simple of course. // Work in progress. SymbolTableMap::const_iterator pos = GlobalSymbolTable.find(Name); |