summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-05 16:28:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-05 16:28:08 +0000
commit1ff1d1fd51cacce062a3f6dd3c787eefadab08cb (patch)
treee3d401d6f56ae0f1afffb5b4437ef4a1011fbb39 /clang/lib/Parse/ParseDecl.cpp
parenteca183bad2b53c5aae0d1393ec3fe796867bf87e (diff)
downloadbcm5719-llvm-1ff1d1fd51cacce062a3f6dd3c787eefadab08cb.tar.gz
bcm5719-llvm-1ff1d1fd51cacce062a3f6dd3c787eefadab08cb.zip
Move AsmLabel into Declarator instead of just a parameter to
ActOnDeclarator. llvm-svn: 54353
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp8
1 files changed, 4 insertions, 4 deletions
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)) {
OpenPOWER on IntegriCloud