diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 20:43:10 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 20:43:10 +0000 |
commit | a2e40fbd624916c187a95ed76939ca7f02ed3e53 (patch) | |
tree | a2123a8cee6f7edaf0bb085625c018314e4e46fd /include/llvm/ExecutionEngine/RuntimeDyld.h | |
parent | 9f2bebbc288354f0818f3a319a91cc7efd09ef93 (diff) | |
download | llvm-a2e40fbd624916c187a95ed76939ca7f02ed3e53.tar.gz llvm-a2e40fbd624916c187a95ed76939ca7f02ed3e53.tar.bz2 llvm-a2e40fbd624916c187a95ed76939ca7f02ed3e53.tar.xz |
Add EH support to the MCJIT.
This gets exception handling working on ELF and Macho (x86-64 at least).
Other than the EH frame registration, this patch also implements support
for GOT relocations which are used to locate the personality function on
MachO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine/RuntimeDyld.h')
-rw-r--r-- | include/llvm/ExecutionEngine/RuntimeDyld.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/RuntimeDyld.h b/include/llvm/ExecutionEngine/RuntimeDyld.h index 4222d5335b..c6c126c6e2 100644 --- a/include/llvm/ExecutionEngine/RuntimeDyld.h +++ b/include/llvm/ExecutionEngine/RuntimeDyld.h @@ -66,6 +66,11 @@ public: /// /// Returns true if an error occurred, false otherwise. virtual bool applyPermissions(std::string *ErrMsg = 0) = 0; + + /// Register the EH frames with the runtime so that c++ exceptions work. The + /// default implementation does nothing. Look at SectionMemoryManager for one + /// that uses __register_frame. + virtual void registerEHFrames(StringRef SectionData); }; class RuntimeDyld { @@ -109,6 +114,8 @@ public: void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress); StringRef getErrorString(); + + StringRef getEHFrameSection(); }; } // end namespace llvm |