diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-02-28 01:06:02 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-02-28 01:06:02 +0000 |
| commit | dc2cc67e57ccc23ccbf4865e534b38b687c9fce3 (patch) | |
| tree | 3ec2249038bf83677d4fd1884261e462e92eaa80 /clang/lib/CodeGen | |
| parent | 0709542628f3e11d07eb4a57e62e1818b07fb808 (diff) | |
| download | bcm5719-llvm-dc2cc67e57ccc23ccbf4865e534b38b687c9fce3.tar.gz bcm5719-llvm-dc2cc67e57ccc23ccbf4865e534b38b687c9fce3.zip | |
remove a bogus assertion, add a comment.
llvm-svn: 126603
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 70cda5a2254..c67d1d1b0da 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -857,9 +857,6 @@ static CSFC_Result CollectStatementsForCase(const Stmt *S, const SwitchCase *Case, bool &FoundCase, llvm::SmallVectorImpl<const Stmt*> &ResultStmts) { - assert((!FoundCase || Case == 0) && - "Can't be looking for the case if we already found it!"); - // If this is a null statement, just succeed. if (S == 0) return Case ? CSFC_Success : CSFC_FallThrough; @@ -942,6 +939,7 @@ static CSFC_Result CollectStatementsForCase(const Stmt *S, // just verify it doesn't have labels, which would make it invalid to elide. if (Case) { if (CodeGenFunction::ContainsLabel(S, true) || + // Don't skip over DeclStmts, which can be used even if skipped over. isa<DeclStmt>(S)) return CSFC_Failure; return CSFC_Success; |

