Don't ast-print the builtin __[u]int128_t.

llvm-svn: 106212
This commit is contained in:
Argyrios Kyrtzidis 2010-06-17 10:52:11 +00:00
parent 8c02c13e19
commit fa533e7652
1 changed files with 9 additions and 4 deletions

View File

@ -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