output body of folded case again.

llvm-svn: 148361
This commit is contained in:
Fariborz Jahanian 2012-01-17 23:55:19 +00:00
parent 62e5f55874
commit 07b5f4ca03
2 changed files with 4 additions and 2 deletions

View File

@ -883,8 +883,10 @@ void CodeGenFunction::EmitCaseStmt(const CaseStmt &S) {
// when we've constant-folded the switch, are emitting the constant case,
// and part of the constant case includes another case statement. For
// instance: switch (4) { case 4: do { case 5: } while (1); }
if (!SwitchInsn)
if (!SwitchInsn) {
EmitStmt(S.getSubStmt());
return;
}
// Handle case ranges.
if (S.getRHS()) {

View File

@ -18,4 +18,4 @@ int main(void) {
return test(5);
}
// CHECK-NOT: call i32 (i8*, ...)* @printf(
// CHECK: call i32 (i8*, ...)* @_Z6printfPKcz