[InlineFunction] Correctly inline TerminatePadInst
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 13 Oct 2015 22:08:17 +0000 (22:08 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 13 Oct 2015 22:08:17 +0000 (22:08 +0000)
commit3c196ec6096ce448cd31dc606de4142066917d66
tree8f7212d78c37390283055c3e064331ca6988e994
parent3e6689ff8a1174665ac74d1380ba159fae5ef7e8
[InlineFunction] Correctly inline TerminatePadInst

We forgot to append the terminatepad's arguments which resulted in us
treating the old terminatepad as an argument to the new terminatepad
causing us to crash immediately.  Instead, add the old terminatepad's
arguments to the new terminatepad.

This fixes PR25155.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250234 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/PR25155.ll [new file with mode: 0644]