Always forward 'resume' instructions to the outter landing pad.
authorBill Wendling <isanbard@gmail.com>
Thu, 21 Mar 2013 23:30:12 +0000 (23:30 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 21 Mar 2013 23:30:12 +0000 (23:30 +0000)
commit173c71ff3d06fcca28442e423759357117e1916b
treecdd0e66fe8d94e3956406afcb1dba4e9eb46a00a
parent891671afe508faa9f8812af77d5b0b21b315961d
Always forward 'resume' instructions to the outter landing pad.

How did this ever work?

Basically, if you have a function that's inlined into the caller, it may not
have any 'call' instructions, but any 'resume' instructions it may have should
still be forwarded to the outer (caller's) landing pad. This requires that all
of the 'landingpad' instructions in the callee have their clauses merged with
the caller's outer 'landingpad' instruction (hence the bit of ugly code in the
`forwardResume' method).

Testcase in a follow commit to the test-suite repository.

<rdar://problem/13360379> & PR15555

llvm-svn: 177680
llvm/lib/Transforms/Utils/InlineFunction.cpp