]> granicus.if.org Git - clang/commitdiff
Add private extern to pretty printer(s).
authorMike Stump <mrs@apple.com>
Tue, 10 Feb 2009 23:49:50 +0000 (23:49 +0000)
committerMike Stump <mrs@apple.com>
Tue, 10 Feb 2009 23:49:50 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64258 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/ASTConsumers.cpp
lib/AST/StmtPrinter.cpp

index c504f0fc9ae3c3221c9822abeb1df4994cc7f1fa..91c19ba45de24c26e90f59cc9f33740d76eac7a7 100644 (file)
@@ -176,11 +176,12 @@ void DeclPrinter::Print(NamedDecl *ND) {
     if (VarDecl *V = dyn_cast<VarDecl>(ND)) {
       switch (V->getStorageClass()) {
       default: assert(0 && "Unknown storage class!");
-      case VarDecl::None:     break;
-      case VarDecl::Extern:   Out << "extern "; break;
-      case VarDecl::Static:   Out << "static "; break; 
-      case VarDecl::Auto:     Out << "auto "; break;
-      case VarDecl::Register: Out << "register "; break;
+      case VarDecl::None:          break;
+      case VarDecl::Auto:          Out << "auto "; break;
+      case VarDecl::Register:      Out << "register "; break;
+      case VarDecl::Extern:        Out << "extern "; break;
+      case VarDecl::Static:        Out << "static "; break; 
+      case VarDecl::PrivateExtern: Out << "static "; break; 
       }
     }
     std::string Name = ND->getNameAsString();
index cc32fa23d9c223fa9c0db48b2e80234a786cf433..7e3180d22814c9e4597a2daa076d7e93793a8e7b 100644 (file)
@@ -119,11 +119,12 @@ void StmtPrinter::PrintRawDecl(Decl *D) {
     if (VarDecl *V = dyn_cast<VarDecl>(VD)) {
       switch (V->getStorageClass()) {
         default: assert(0 && "Unknown storage class!");
-        case VarDecl::None:     break;
-        case VarDecl::Extern:   OS << "extern "; break;
-        case VarDecl::Static:   OS << "static "; break; 
-        case VarDecl::Auto:     OS << "auto "; break;
-        case VarDecl::Register: OS << "register "; break;
+        case VarDecl::None:          break;
+        case VarDecl::Extern:        OS << "extern "; break;
+        case VarDecl::Static:        OS << "static "; break; 
+        case VarDecl::Auto:          OS << "auto "; break;
+        case VarDecl::Register:      OS << "register "; break;
+        case VarDecl::PrivateExtern: OS << "__private_extern "; break; 
       }
     }