summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-01-30 22:16:45 +0000
committerReid Kleckner <reid@kleckner.net>2015-01-30 22:16:45 +0000
commit3a417c301bc88de5c9d7db2fca7de58f5273c15d (patch)
tree530d70a2d320d726587abdced037c6f0acd087a6 /clang/lib
parentd77bbab393005193fc36153793f65d1279c5b316 (diff)
downloadbcm5719-llvm-3a417c301bc88de5c9d7db2fca7de58f5273c15d.tar.gz
bcm5719-llvm-3a417c301bc88de5c9d7db2fca7de58f5273c15d.zip
SEH: Don't jump to an unreachable continuation block
If both the __try and __except blocks do not return, we want to delete the continuation block as unreachable instead. llvm-svn: 227627
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGException.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 68764e92606..9f886ebb13a 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1899,7 +1899,8 @@ void CodeGenFunction::ExitSEHTryStmt(const SEHTryStmt &S) {
// Emit the __except body.
EmitStmt(Except->getBlock());
- Builder.CreateBr(ContBB);
+ if (HaveInsertPoint())
+ Builder.CreateBr(ContBB);
EmitBlock(ContBB);
}
OpenPOWER on IntegriCloud