diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-03-22 18:05:27 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-03-22 18:05:27 +0000 |
commit | 34714a06096f854c76371295d8c20b017fbba50b (patch) | |
tree | 331ffaad455fbc41ceaeb4f0f9e4cab18966401e /lib/ExecutionEngine/MCJIT/MCJIT.h | |
parent | 8bf0ecdbf6d9a645638806441e1b65cb308cd3e7 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT/MCJIT.h')
-rw-r--r-- | lib/ExecutionEngine/MCJIT/MCJIT.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.h b/lib/ExecutionEngine/MCJIT/MCJIT.h index 947f7c78e3..915ca0ea1e 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/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 /// @{ |