diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-06 18:42:27 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-06 18:42:27 +0000 |
commit | e4ea1f42c97a436df3e0ae8e129e6bc624ee6790 (patch) | |
tree | 5de0cdfc2bf93cfa443429346f0d0821e96fea0b | |
parent | ecd64c5e53012ab7b1fdc64094a24f83c9893581 (diff) |
In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57192 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index f70b86661d..024fb0a659 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -482,9 +482,9 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { } 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() { |