summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-17 10:52:11 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-06-17 10:52:11 +0000
commitfa533e7652fc3d41f9ccb4499ddee4deeb81a298 (patch)
tree20b784e8067f7132d38ac7ac41366bd5d6d288c0 /clang/lib/AST/DeclPrinter.cpp
parent8c02c13e1960970f19b7d3d2e185fa76e8fade6d (diff)
downloadbcm5719-llvm-fa533e7652fc3d41f9ccb4499ddee4deeb81a298.tar.gz
bcm5719-llvm-fa533e7652fc3d41f9ccb4499ddee4deeb81a298.zip
Don't ast-print the builtin __[u]int128_t.
llvm-svn: 106212
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 2fb6cb1d311..c72401c96d8 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -202,10 +202,15 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
// 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;
+ // of __builtin_va_list or __[u]int128_t. There should be some other way
+ // to check that.
+ if (NamedDecl *ND = dyn_cast<NamedDecl>(*D)) {
+ if (IdentifierInfo *II = ND->getIdentifier()) {
+ if (II->isStr("__builtin_va_list") ||
+ II->isStr("__int128_t") || II->isStr("__uint128_t"))
+ continue;
+ }
+ }
}
// The next bits of code handles stuff like "struct {int x;} a,b"; we're
OpenPOWER on IntegriCloud