diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2015-02-26 22:34:33 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2015-02-26 22:34:33 +0000 |
| commit | ff62a6a0b79da24fe6336fe1dfbe1bc11d0a563a (patch) | |
| tree | 89207f1f0497d60acc34f2ad6825ec63583d6c54 /clang/test/CodeGen/exceptions-seh-leave.c | |
| parent | 653773d0048de921fbd5cf6a4aa2767a7cd9158a (diff) | |
| download | bcm5719-llvm-ff62a6a0b79da24fe6336fe1dfbe1bc11d0a563a.tar.gz bcm5719-llvm-ff62a6a0b79da24fe6336fe1dfbe1bc11d0a563a.zip | |
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
llvm-svn: 230697
Diffstat (limited to 'clang/test/CodeGen/exceptions-seh-leave.c')
| -rw-r--r-- | clang/test/CodeGen/exceptions-seh-leave.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/CodeGen/exceptions-seh-leave.c b/clang/test/CodeGen/exceptions-seh-leave.c index c590bd87033..7901c8c2fbd 100644 --- a/clang/test/CodeGen/exceptions-seh-leave.c +++ b/clang/test/CodeGen/exceptions-seh-leave.c @@ -162,6 +162,13 @@ int nested___except___finally() { // CHECK-NEXT: br label %[[tryleave:[^ ]*]] // CHECK-NOT: store i32 23 +// Unused __finally continuation block +// CHECK: store i32 51, i32* % +// CHECK-NEXT: br label %[[tryleave]] + +// CHECK: [[tryleave]] +// CHECK-NEXT: br label %[[trycont:[^ ]*]] + // CHECK: [[g1_lpad]] // CHECK: store i8 1, i8* % // CHECK-NEXT: br label %[[finally]] @@ -171,14 +178,11 @@ int nested___except___finally() { // CHECK: br label %[[except:[^ ]*]] // CHECK: [[except]] -// CHECK-NEXT: br label %[[trycont:[^ ]*]] +// CHECK-NEXT: br label %[[trycont]] // CHECK: [[trycont]] // CHECK-NEXT: ret i32 1 -// CHECK: [[tryleave]] -// CHECK-NEXT: br label %[[trycont]] - int nested___except___except() { int myres = 0; __try { |

