summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-03-22 18:05:27 +0000
committerJim Grosbach <grosbach@apple.com>2011-03-22 18:05:27 +0000
commitd52744086f6edca9414dc2b14e48c9fe6fa9818d (patch)
tree8051421aeef6d2b5b819653d187f58cfb0e9b2ab /llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
parentd2348d8d3f18034e08c4a114df27a34ff31b52be (diff)
downloadbcm5719-llvm-d52744086f6edca9414dc2b14e48c9fe6fa9818d.tar.gz
bcm5719-llvm-d52744086f6edca9414dc2b14e48c9fe6fa9818d.zip
Add simple arg passing to MC-JIT and support for exit() call.
Support argument passing simple, common, prototypes directly. More complicated scenarios will require building up a stub function, which the MC-JIT isn't set up to handle yet. Add Intercept.cpp, which is just a copy from ExecutionEngine/JIT for now, to handle looking looking up external symbol names. This probably more properly belongs as part of RuntimeDyld. It'll migrate there as things flesh out more fully. llvm-svn: 128090
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT/MCJIT.h')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
index 947f7c78e38..915ca0ea1e0 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
@@ -57,6 +57,16 @@ public:
virtual GenericValue runFunction(Function *F,
const std::vector<GenericValue> &ArgValues);
+ /// 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.
+ ///
+ void *getPointerToNamedFunction(const std::string &Name,
+ bool AbortOnFailure = true);
/// @}
/// @name (Private) Registration Interfaces
/// @{
OpenPOWER on IntegriCloud