[cfe-commits] r57192 - /cfe/trunk/lib/CodeGen/CGStmt.cpp
Ted Kremenek
kremenek at apple.com
Mon Oct 6 11:42:27 PDT 2008
Author: kremenek
Date: Mon Oct 6 13:42:27 2008
New Revision: 57192
URL: http://llvm.org/viewvc/llvm-project?rev=57192&view=rev
Log:
In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.
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=57192&r1=57191&r2=57192&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Mon Oct 6 13:42:27 2008
@@ -482,9 +482,9 @@
}
void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
- for (const ScopedDecl *Decl = S.getDecl(); Decl;
- Decl = Decl->getNextDeclarator())
- EmitDecl(*Decl);
+ for (DeclStmt::const_decl_iterator I = S.decl_begin(), E = S.decl_end();
+ I != E; ++I)
+ EmitDecl(**I);
}
void CodeGenFunction::EmitBreakStmt() {
More information about the cfe-commits
mailing list