mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Register EH frames emitted in JIT when using gcc unwinding runtime
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a0a001e15
commit
299d9d74e9
@ -61,6 +61,10 @@ namespace llvm {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (__GNUC__)
|
||||
extern "C" void __register_frame(void*);
|
||||
#endif
|
||||
|
||||
/// createJIT - This is the factory method for creating a JIT for the current
|
||||
/// machine, it does not fall back to the interpreter. This takes ownership
|
||||
/// of the module provider.
|
||||
@ -70,7 +74,11 @@ ExecutionEngine *ExecutionEngine::createJIT(ModuleProvider *MP,
|
||||
ExecutionEngine *EE = JIT::createJIT(MP, ErrorStr, JMM);
|
||||
if (!EE) return 0;
|
||||
|
||||
|
||||
// Register routine for informing unwinding runtime about new EH frames
|
||||
#if defined(__GNUC__)
|
||||
EE->InstallExceptionTableRegister(__register_frame);
|
||||
#endif
|
||||
|
||||
// Make sure we can resolve symbols in the program as well. The zero arg
|
||||
// to the function tells DynamicLibrary to load the program, not a library.
|
||||
sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user