Move the sjlj exception handling conversions to a back-end pass where they

more properly belong. This allows removing the front-end conditionalized
SJLJ code, and cleans up the generated IR considerably. All of the
infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is
added by the SjLjEHPrepare pass.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2009-08-17 16:41:22 +00:00
parent 2a5e23b44d
commit 8b818d7e98
5 changed files with 542 additions and 34 deletions
+4 -1
View File
@@ -241,8 +241,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
// handle.
switch (getTargetAsmInfo()->getExceptionHandlingType())
{
// SjLj piggy-backs on dwarf for this bit
case ExceptionHandling::SjLj:
// SjLj piggy-backs on dwarf for this bit. The cleanups done apply to both
PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None));
PM.add(createSjLjEHPass(getTargetLowering()));
break;
case ExceptionHandling::Dwarf:
PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None));
break;