summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-30 06:35:22 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-30 06:35:22 +0000
commit17304245165e4172478ccdaab989184629645fec (patch)
tree90abbe9743434189f7ecaea1ab9d0c4b280c14fc /clang/lib
parent3bc6e4c72aa91604812b1a387b435a84c0489d4f (diff)
downloadbcm5719-llvm-17304245165e4172478ccdaab989184629645fec.tar.gz
bcm5719-llvm-17304245165e4172478ccdaab989184629645fec.zip
Add a hack to prevent us from printing out the __builtin_va_list
declaration in -ast-print mode. llvm-svn: 72615
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index bfd3dca3e6d..01cbee4d637 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -178,6 +178,11 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
if (!Policy.Dump) {
// Skip over implicit declarations in pretty-printing mode.
if (D->isImplicit()) continue;
+ // FIXME: Ugly hack so we don't pretty-print the builtin declaration
+ // of __builtin_va_list. There should be some other way to check that.
+ if (isa<NamedDecl>(*D) && cast<NamedDecl>(*D)->getNameAsString() ==
+ "__builtin_va_list")
+ continue;
}
// The next bits of code handles stuff like "struct {int x;} a,b"; we're
OpenPOWER on IntegriCloud