mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Register the frame register function when allocating the JIT,
so that lli works out of the box with -enable-eh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -78,11 +78,6 @@ ExecutionEngine *ExecutionEngine::createJIT(ModuleProvider *MP,
|
|||||||
ExecutionEngine *EE = JIT::createJIT(MP, ErrorStr, JMM, Fast);
|
ExecutionEngine *EE = JIT::createJIT(MP, ErrorStr, JMM, Fast);
|
||||||
if (!EE) return 0;
|
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
|
// 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.
|
// to the function tells DynamicLibrary to load the program, not a library.
|
||||||
sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr);
|
sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr);
|
||||||
@@ -111,6 +106,11 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji,
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Register routine for informing unwinding runtime about new EH frames
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
InstallExceptionTableRegister(__register_frame);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize passes.
|
// Initialize passes.
|
||||||
PM.doInitialization();
|
PM.doInitialization();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user