diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-02-13 18:39:37 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-02-13 18:39:37 +0000 |
commit | afe6c2b001a924cd74bd0aacfed5984d9af004b0 (patch) | |
tree | e028f30be64937c842b04895eab4abe731478dfb /include/llvm/ExecutionEngine/ExecutionEngine.h | |
parent | 84ad8378eea47288fb1c923312689bdd01cd4264 (diff) |
Enable exception handling int JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ExecutionEngine/ExecutionEngine.h')
-rw-r--r-- | include/llvm/ExecutionEngine/ExecutionEngine.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index f2249ec197..461efe3235 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -85,6 +85,11 @@ protected: /// pointer is invoked to create it. If this returns null, the JIT will abort. void* (*LazyFunctionCreator)(const std::string &); + /// ExceptionTableRegister - If Exception Handling is set, the JIT will + /// register dwarf tables with this function + typedef void (*EERegisterFn)(void*); + static EERegisterFn ExceptionTableRegister; + public: /// lock - This lock is protects the ExecutionEngine, JIT, JITResolver and /// JITEmitter classes. It must be held while changing the internal state of @@ -246,6 +251,19 @@ public: void InstallLazyFunctionCreator(void* (*P)(const std::string &)) { LazyFunctionCreator = P; } + + /// InstallExceptionTableRegister - The JIT will use the given function + /// to register the exception tables it generates. + static void InstallExceptionTableRegister(void (*F)(void*)) { + ExceptionTableRegister = F; + } + + /// RegisterTable - Registers the given pointer as an exception table. It uses + /// the ExceptionTableRegister function. + static void RegisterTable(void* res) { + if (ExceptionTableRegister) + ExceptionTableRegister(res); + } protected: explicit ExecutionEngine(ModuleProvider *P); |