diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 16:28:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 16:28:08 +0000 |
commit | 914701ed49f31323176a784b49df05a0d177d1ad (patch) | |
tree | 50084d57103bbaaa4ba230ffe8e76039e3e224cd /lib/Parse/ParseDecl.cpp | |
parent | 894bbab6314e85b5bdc5b03b97d8561fbe8545a7 (diff) |
Move AsmLabel into Declarator instead of just a parameter to
ActOnDeclarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 33482c5700..1cf331702d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/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)) { |