]> granicus.if.org Git - clang/commitdiff
Unbreak -stats on cocoa.h
authorChris Lattner <sabre@nondot.org>
Wed, 12 Dec 2007 06:43:05 +0000 (06:43 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Dec 2007 06:43:05 +0000 (06:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44919 91177308-0d34-0410-b5e6-96231b3b80d8

AST/ASTContext.cpp
test/Sema/carbon.c
test/Sema/cocoa.m

index 4a40f839f0901a127ea6698dd4926b6d1d02cae0..82ff36245e1d6e9be199f80477e43324f083c64d 100644 (file)
@@ -48,7 +48,7 @@ void ASTContext::PrintStats() const {
   unsigned NumFunctionNP = 0, NumTypeName = 0, NumTagged = 0, NumReference = 0;
   
   unsigned NumTagStruct = 0, NumTagUnion = 0, NumTagEnum = 0, NumTagClass = 0;
-  unsigned NumObjcInterfaces = 0;
+  unsigned NumObjcInterfaces = 0, NumObjcQualifiedInterfaces = 0;
   
   for (unsigned i = 0, e = Types.size(); i != e; ++i) {
     Type *T = Types[i];
@@ -81,7 +81,10 @@ void ASTContext::PrintStats() const {
       }
     } else if (isa<ObjcInterfaceType>(T))
       ++NumObjcInterfaces;
+    else if (isa<ObjcQualifiedInterfaceType>(T))
+      ++NumObjcQualifiedInterfaces;
     else {
+      QualType(T, 0).dump();
       assert(0 && "Unknown type!");
     }
   }
@@ -101,6 +104,8 @@ void ASTContext::PrintStats() const {
   fprintf(stderr, "      %d class types\n", NumTagClass);
   fprintf(stderr, "      %d enum types\n", NumTagEnum);
   fprintf(stderr, "    %d interface types\n", NumObjcInterfaces);
+  fprintf(stderr, "    %d protocol qualified interface types\n",
+          NumObjcQualifiedInterfaces);
   fprintf(stderr, "Total bytes = %d\n", int(NumBuiltin*sizeof(BuiltinType)+
     NumPointer*sizeof(PointerType)+NumArray*sizeof(ArrayType)+
     NumComplex*sizeof(ComplexType)+NumVector*sizeof(VectorType)+
index 523526edc9575f1477ce4e77b64e85120dd1cea2..1756fd4c1cec6639b815c1df8b32cff9336c4940 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -stats
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
 #endif
index c3d829c064dcf7bb18656e345562dccdea6401db..cfb1f4ed409352e874f025ee9963231862213f0e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang %s
+// RUN: clang %s -stats
 #ifdef __APPLE__
 #include <Cocoa/Cocoa.h>
 #endif