]> granicus.if.org Git - clang/commit
Don't crash on leaving nested __finally blocks through an EH edge.
authorNico Weber <nicolasweber@gmx.de>
Thu, 26 Feb 2015 22:34:33 +0000 (22:34 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 26 Feb 2015 22:34:33 +0000 (22:34 +0000)
commitc8347e9163ca02e9a02a58c9360fbcf20df1048d
tree458d9c02a16f9c26c1e8d770d19431597eadd3be
parent45bdc5d280c1a167295ad8ee8ac3dc98d62a292e
Don't crash on leaving nested __finally blocks through an EH edge.

The __finally emission block tries to be clever by removing unused continuation
edges if there's an unconditional jump out of the __finally block. With
exception edges, the EH continuation edge isn't always unused though and we'd
crash in a few places.

Just don't be clever. That makes the IR for __finally blocks a bit longer in
some cases (hence small and behavior-preserving changes to existing tests), but
it makes no difference in general and it fixes the last crash from PR22553.

http://reviews.llvm.org/D7918

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230697 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGException.cpp
test/CodeGen/exceptions-seh-finally.c
test/CodeGen/exceptions-seh-leave.c