diff options
author | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-03-28 21:46:36 +0000 |
---|---|---|
committer | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-03-28 21:46:36 +0000 |
commit | 30b9e322e159df8eaabb5b194cec6e11ba99c261 (patch) | |
tree | 36664ec6b85c6050e280736f2c6ff2e976957aac /include/llvm/ExecutionEngine | |
parent | 8f3fabe0febb7335c4349d3d6081deca95419d48 (diff) | |
download | llvm-30b9e322e159df8eaabb5b194cec6e11ba99c261.tar.gz llvm-30b9e322e159df8eaabb5b194cec6e11ba99c261.tar.bz2 llvm-30b9e322e159df8eaabb5b194cec6e11ba99c261.tar.xz |
Move getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r-- | include/llvm/ExecutionEngine/JITMemoryManager.h | 11 | ||||
-rw-r--r-- | include/llvm/ExecutionEngine/RuntimeDyld.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/JITMemoryManager.h b/include/llvm/ExecutionEngine/JITMemoryManager.h index 8eb7590a21..4c75b6ab97 100644 --- a/include/llvm/ExecutionEngine/JITMemoryManager.h +++ b/include/llvm/ExecutionEngine/JITMemoryManager.h @@ -47,6 +47,17 @@ public: /// debugging, and may be turned on by default in debug mode. virtual void setPoisonMemory(bool poison) = 0; + /// getPointerToNamedFunction - This method returns the address of the + /// specified function. As such it is only useful for resolving library + /// symbols, not code generated symbols. + /// + /// If AbortOnFailure is false and no function with the given name is + /// found, this function silently returns a null pointer. Otherwise, + /// it prints a message to stderr and aborts. + /// + virtual void *getPointerToNamedFunction(const std::string &Name, + bool AbortOnFailure = true) = 0; + //===--------------------------------------------------------------------===// // Global Offset Table Management //===--------------------------------------------------------------------===// diff --git a/include/llvm/ExecutionEngine/RuntimeDyld.h b/include/llvm/ExecutionEngine/RuntimeDyld.h index 8ad316bc3f..81acc08673 100644 --- a/include/llvm/ExecutionEngine/RuntimeDyld.h +++ b/include/llvm/ExecutionEngine/RuntimeDyld.h @@ -54,6 +54,10 @@ public: // memory was actually used. virtual void endFunctionBody(const char *Name, uint8_t *FunctionStart, uint8_t *FunctionEnd) = 0; + + + virtual void *getPointerToNamedFunction(const std::string &Name, + bool AbortOnFailure = true) = 0; }; class RuntimeDyld { |