mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
SjLj based exception handling unwinding support. This patch is nasty, brutish
and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -229,10 +229,17 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
|
||||
|
||||
// Turn exception handling constructs into something the code generators can
|
||||
// handle.
|
||||
if (!getTargetAsmInfo()->doesSupportExceptionHandling())
|
||||
PM.add(createLowerInvokePass(getTargetLowering()));
|
||||
else
|
||||
switch (getTargetAsmInfo()->getExceptionHandlingType())
|
||||
{
|
||||
// SjLj piggy-backs on dwarf for this bit
|
||||
case ExceptionHandling::SjLj:
|
||||
case ExceptionHandling::Dwarf:
|
||||
PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None));
|
||||
break;
|
||||
case ExceptionHandling::None:
|
||||
PM.add(createLowerInvokePass(getTargetLowering()));
|
||||
break;
|
||||
}
|
||||
|
||||
PM.add(createGCLoweringPass());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user