diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 0db31ac..4bcfbf8 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -417,12 +417,7 @@ void CodeGenFunction::EmitIndirectGotoStmt(const IndirectGotoStmt &S) { void CodeGenFunction::EmitIfStmt(const IfStmt &S) { // C99 6.8.4.1: The first substatement is executed if the expression compares // unequal to 0. The condition must be a scalar type. - RunCleanupsScope ConditionScope(*this); - - // Also open a debugger-visible lexical scope for the condition. - CGDebugInfo *DI = getDebugInfo(); - if (DI) - DI->EmitLexicalBlockStart(Builder, S.getSourceRange().getBegin()); + LexicalScope ConditionScope(*this, S.getSourceRange()); if (S.getConditionVariable()) EmitAutoVarDecl(*S.getConditionVariable()); @@ -444,8 +439,6 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { RunCleanupsScope ExecutedScope(*this); EmitStmt(Executed); } - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd()); return; } } @@ -483,9 +476,6 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { EmitBranch(ContBlock); } - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd()); - // Emit the continuation block for code after the if. EmitBlock(ContBlock, true); } @@ -1345,7 +1335,7 @@ SimplifyConstraint(const char *Constraint, const TargetInfo &Target, break; case '#': // Ignore the rest of the constraint alternative. while (Constraint[1] && Constraint[1] != ',') - Constraint++; + Constraint++; break; case ',': Result += "|";