aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorDanil Malyshev <dmalyshev@accesssoftek.com>2012-03-21 18:26:47 +0000
committerDanil Malyshev <dmalyshev@accesssoftek.com>2012-03-21 18:26:47 +0000
commit7803ec3d458ec73372760b838469292cdf38fe67 (patch)
tree296db69c21f61ba3ff4e83427c043b12709245ab /include/llvm/ExecutionEngine
parent331ff3b1d1a08b4a39cea7cdc0c9a8567a5ba1b4 (diff)
downloadexternal_llvm-7803ec3d458ec73372760b838469292cdf38fe67.zip
external_llvm-7803ec3d458ec73372760b838469292cdf38fe67.tar.gz
external_llvm-7803ec3d458ec73372760b838469292cdf38fe67.tar.bz2
Based on this discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html
1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager 2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/JITMemoryManager.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/JITMemoryManager.h b/include/llvm/ExecutionEngine/JITMemoryManager.h
index 8eb7590..3587e38 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 by using the dlsym function call. 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
//===--------------------------------------------------------------------===//