]> granicus.if.org Git - clang/commitdiff
Work around emitters that can't deal with dead code contexts yet.
authorMike Stump <mrs@apple.com>
Mon, 7 Dec 2009 20:12:14 +0000 (20:12 +0000)
committerMike Stump <mrs@apple.com>
Mon, 7 Dec 2009 20:12:14 +0000 (20:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90796 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGException.cpp

index 73f66ccd3f5c16cb460466bde2aed45252e5e95a..1c3f06e358e4832f0a24c76836493a8bf82b48ae 100644 (file)
@@ -263,6 +263,10 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) {
   
   // Clear the insertion point to indicate we are in unreachable code.
   Builder.ClearInsertionPoint();
+
+  // FIXME: For now, emit a dummy basic block because expr emitters in generally
+  // are not ready to handle emitting expressions at unreachable points.
+  EnsureInsertPoint();
 }
 
 void CodeGenFunction::EmitCXXTryStmt(const CXXTryStmt &S) {