[cfe-commits] r106212 - /cfe/trunk/lib/AST/DeclPrinter.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Thu Jun 17 03:52:11 PDT 2010


Author: akirtzidis
Date: Thu Jun 17 05:52:11 2010
New Revision: 106212

URL: http://llvm.org/viewvc/llvm-project?rev=106212&view=rev
Log:
Don't ast-print the builtin __[u]int128_t.

Modified:
    cfe/trunk/lib/AST/DeclPrinter.cpp

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=106212&r1=106211&r2=106212&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Thu Jun 17 05:52:11 2010
@@ -202,10 +202,15 @@
       // 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





More information about the cfe-commits mailing list