summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-06 18:42:27 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-06 18:42:27 +0000
commit704a2505db2e07e0d876695b4fcd0d58064e43b8 (patch)
tree710fc508cbd7a159a4871f98cf08b4d815032987 /clang/lib/CodeGen
parent15e6b40832aa0d83bd3f8d9b5b287632535e67ae (diff)
downloadbcm5719-llvm-704a2505db2e07e0d876695b4fcd0d58064e43b8.tar.gz
bcm5719-llvm-704a2505db2e07e0d876695b4fcd0d58064e43b8.zip
In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.
llvm-svn: 57192
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index f70b86661df..024fb0a6599 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/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() {
OpenPOWER on IntegriCloud