From e4ea1f42c97a436df3e0ae8e129e6bc624ee6790 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 6 Oct 2008 18:42:27 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGStmt.cpp | 6 +++--- 1 file 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() { -- 2.40.0