simplify code.

llvm-svn: 94401
This commit is contained in:
Chris Lattner
2010-01-25 03:29:35 +00:00
parent a1141dd6ab
commit bf78478d35
2 changed files with 13 additions and 23 deletions

View File

@@ -777,10 +777,9 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr,
if (CGDebugInfo *DI = getDebugInfo()) {
// Emit debug information for all the BlockDeclRefDecls.
for (unsigned i=0; i < BlockDeclRefDecls.size(); ++i) {
const Expr *E = BlockDeclRefDecls[i];
const BlockDeclRefExpr *BDRE = dyn_cast<BlockDeclRefExpr>(E);
if (BDRE) {
for (unsigned i = 0, e = BlockDeclRefDecls.size(); i != e; ++i) {
if (const BlockDeclRefExpr *BDRE =
dyn_cast<BlockDeclRefExpr>(BlockDeclRefDecls[i])) {
const ValueDecl *D = BDRE->getDecl();
DI->setLocation(D->getLocation());
DI->EmitDeclareOfBlockDeclRefVariable(BDRE,