summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-17 20:34:02 +0000
committerChris Lattner <sabre@nondot.org>2011-02-17 20:34:02 +0000
commitcab02a60d231b8ca4df80f88689827d8b4cea95e (patch)
tree060d42ab1daa9e8ce9b1d92c55e9014bc5d97e70 /clang/lib/AST/DeclPrinter.cpp
parent50c3c1316a0faf8b3566489aa5030a3f9ed13759 (diff)
downloadbcm5719-llvm-cab02a60d231b8ca4df80f88689827d8b4cea95e.tar.gz
bcm5719-llvm-cab02a60d231b8ca4df80f88689827d8b4cea95e.zip
Step #2/N of __label__ support: keep pushing LabelDecl forward,
making them be template instantiated in a more normal way and make them handle attributes like other decls. This fixes the used/unused label handling stuff, making it use the same infrastructure as other decls. llvm-svn: 125771
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 30c9d8497ca..77b42574709 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -51,6 +51,7 @@ namespace {
void VisitFunctionDecl(FunctionDecl *D);
void VisitFieldDecl(FieldDecl *D);
void VisitVarDecl(VarDecl *D);
+ void VisitLabelDecl(LabelDecl *D);
void VisitParmVarDecl(ParmVarDecl *D);
void VisitFileScopeAsmDecl(FileScopeAsmDecl *D);
void VisitNamespaceDecl(NamespaceDecl *D);
@@ -537,6 +538,11 @@ void DeclPrinter::VisitFieldDecl(FieldDecl *D) {
}
}
+void DeclPrinter::VisitLabelDecl(LabelDecl *D) {
+ Out << D->getNameAsString() << ":";
+}
+
+
void DeclPrinter::VisitVarDecl(VarDecl *D) {
if (!Policy.SuppressSpecifiers && D->getStorageClass() != SC_None)
Out << VarDecl::getStorageClassSpecifierString(D->getStorageClass()) << " ";
OpenPOWER on IntegriCloud