[WinEH] Insert the EH code load before the block terminator
authorReid Kleckner <reid@kleckner.net>
Mon, 6 Jul 2015 21:13:43 +0000 (21:13 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 6 Jul 2015 21:13:43 +0000 (21:13 +0000)
commite23370402ca873c3115bd2cb761005b53d82feea
tree64cff8d7e621e00f0a64647d882c2234be8246e4
parent3ecdd44e5d50403a690ac450d2164ac084a040cd
[WinEH] Insert the EH code load before the block terminator

The previous code put the load after the terminator, leading to invalid
IR and downstream crashes. This caused http://crbug.com/506446.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241509 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/seh-exception-code.ll [new file with mode: 0644]