From 1ff1d1fd51cacce062a3f6dd3c787eefadab08cb Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 5 Aug 2008 16:28:08 +0000 Subject: Move AsmLabel into Declarator instead of just a parameter to ActOnDeclarator. llvm-svn: 54353 --- clang/lib/Parse/ParseDecl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/Parse/ParseDecl.cpp') diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 33482c5700f..1cf331702d9 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -256,13 +256,14 @@ ParseInitDeclaratorListAfterFirstDeclarator(Declarator &D) { // rest of the init-declarator-list. while (1) { // If a simple-asm-expr is present, parse it. - ExprResult AsmLabel; if (Tok.is(tok::kw_asm)) { - AsmLabel = ParseSimpleAsm(); + ExprResult AsmLabel = ParseSimpleAsm(); if (AsmLabel.isInvalid) { SkipUntil(tok::semi); return 0; } + + D.setAsmLabel(AsmLabel.Val); } // If attributes are present, parse them. @@ -271,8 +272,7 @@ ParseInitDeclaratorListAfterFirstDeclarator(Declarator &D) { // Inform the current actions module that we just parsed this declarator. // FIXME: pass asm & attributes. - LastDeclInGroup = Actions.ActOnDeclarator(CurScope, D, LastDeclInGroup, - AsmLabel.Val); + LastDeclInGroup = Actions.ActOnDeclarator(CurScope, D, LastDeclInGroup); // Parse declarator '=' initializer. if (Tok.is(tok::equal)) { -- cgit v1.2.3