r186030 - Use a LexicalScope here since it is one and it will encapsulate
Eric Christopher
echristo at gmail.com
Wed Jul 10 13:14:36 PDT 2013
Author: echristo
Date: Wed Jul 10 15:14:36 2013
New Revision: 186030
URL: http://llvm.org/viewvc/llvm-project?rev=186030&view=rev
Log:
Use a LexicalScope here since it is one and it will encapsulate
the two sets of debug scope and cleanup scope.
Modified:
cfe/trunk/lib/CodeGen/CGStmt.cpp
Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=186030&r1=186029&r2=186030&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Wed Jul 10 15:14:36 2013
@@ -425,12 +425,7 @@ void CodeGenFunction::EmitIndirectGotoSt
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());
@@ -452,8 +447,6 @@ void CodeGenFunction::EmitIfStmt(const I
RunCleanupsScope ExecutedScope(*this);
EmitStmt(Executed);
}
- if (DI)
- DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd());
return;
}
}
@@ -491,9 +484,6 @@ void CodeGenFunction::EmitIfStmt(const I
EmitBranch(ContBlock);
}
- if (DI)
- DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd());
-
// Emit the continuation block for code after the if.
EmitBlock(ContBlock, true);
}
@@ -1353,7 +1343,7 @@ SimplifyConstraint(const char *Constrain
break;
case '#': // Ignore the rest of the constraint alternative.
while (Constraint[1] && Constraint[1] != ',')
- Constraint++;
+ Constraint++;
break;
case ',':
Result += "|";
More information about the cfe-commits
mailing list