aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-28 01:06:02 +0000
committerChris Lattner <sabre@nondot.org>2011-02-28 01:06:02 +0000
commit035287d73947320d2ff65b7d9a5c3d990427eee3 (patch)
treef891e8bcf5006f1ca0eeb568545e2ff424f052b6 /lib/CodeGen/CGStmt.cpp
parent3858938b043bac2f046304ff99a54905acdcc6dd (diff)
remove a bogus assertion, add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 70cda5a225..c67d1d1b0d 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/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;