From beb663677aa20db59da4e5ab7d535804ec6f963c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 12 Dec 2007 06:43:05 +0000 Subject: [PATCH] Unbreak -stats on cocoa.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44919 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/ASTContext.cpp | 7 ++++++- test/Sema/carbon.c | 2 +- test/Sema/cocoa.m | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 4a40f839f0..82ff36245e 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -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(T)) ++NumObjcInterfaces; + else if (isa(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)+ diff --git a/test/Sema/carbon.c b/test/Sema/carbon.c index 523526edc9..1756fd4c1c 100644 --- a/test/Sema/carbon.c +++ b/test/Sema/carbon.c @@ -1,4 +1,4 @@ -// RUN: clang %s -fsyntax-only +// RUN: clang %s -fsyntax-only -stats #ifdef __APPLE__ #include #endif diff --git a/test/Sema/cocoa.m b/test/Sema/cocoa.m index c3d829c064..cfb1f4ed40 100644 --- a/test/Sema/cocoa.m +++ b/test/Sema/cocoa.m @@ -1,4 +1,4 @@ -// RUN: clang %s +// RUN: clang %s -stats #ifdef __APPLE__ #include #endif -- 2.50.1