summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 03:29:35 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 03:29:35 +0000
commitbf78478d35b51cc924afd74f650ac8ba99f2ba78 (patch)
tree5f304f6e7db507abe3aab9755f7928571412dc40 /clang/lib/CodeGen/CGBlocks.cpp
parenta1141dd6abf369ec2f71ec399db7fcbfe3717aac (diff)
downloadbcm5719-llvm-bf78478d35b51cc924afd74f650ac8ba99f2ba78.tar.gz
bcm5719-llvm-bf78478d35b51cc924afd74f650ac8ba99f2ba78.zip
simplify code.
llvm-svn: 94401
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index ca5b6fa97c2..72da7d32eb1 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -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,
OpenPOWER on IntegriCloud