aboutsummaryrefslogtreecommitdiff
path: root/Driver/PrintParserCallbacks.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-05 01:35:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-05 01:35:17 +0000
commita80f8749f2968d19595ca2544114932bf0ca2c11 (patch)
treefb1a27a8795fa3ac5c6b965cf38d1be74bfe49dc /Driver/PrintParserCallbacks.cpp
parent820b03398fdcc8f1f6c60ace55b708e311fa8ce4 (diff)
Add more Parser/Sema support for GCC asm-label extension.
- ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/PrintParserCallbacks.cpp')
-rw-r--r--Driver/PrintParserCallbacks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Driver/PrintParserCallbacks.cpp b/Driver/PrintParserCallbacks.cpp
index fec13e3909..2de16144d5 100644
--- a/Driver/PrintParserCallbacks.cpp
+++ b/Driver/PrintParserCallbacks.cpp
@@ -30,7 +30,7 @@ namespace {
/// and 'Init' specifies the initializer if any. This is for things like:
/// "int X = 4" or "typedef int foo".
virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D,
- DeclTy *LastInGroup) {
+ DeclTy *LastInGroup, ExprTy *AsmLabel) {
llvm::cout << __FUNCTION__ << " ";
if (IdentifierInfo *II = D.getIdentifier()) {
llvm::cout << "'" << II->getName() << "'";
@@ -40,7 +40,7 @@ namespace {
llvm::cout << "\n";
// Pass up to EmptyActions so that the symbol table is maintained right.
- return MinimalAction::ActOnDeclarator(S, D, LastInGroup);
+ return MinimalAction::ActOnDeclarator(S, D, LastInGroup, AsmLabel);
}
/// ActOnPopScope - This callback is called immediately before the specified
/// scope is popped and deleted.