1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,

catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.

llvm-svn: 93456
This commit is contained in:
Jim Grosbach 2010-01-14 21:22:16 +00:00
parent c0321eb1aa
commit d3d283dc19

View File

@ -280,8 +280,8 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
{
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()));
PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None));
break;
case ExceptionHandling::Dwarf:
PM.add(createDwarfEHPass(getTargetLowering(), OptLevel==CodeGenOpt::None));