aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-12 06:43:05 +0000
committerChris Lattner <sabre@nondot.org>2007-12-12 06:43:05 +0000
commitbeb663677aa20db59da4e5ab7d535804ec6f963c (patch)
tree7bd2a7d107a2fcefb7e1e929280f08ed28a1ed82
parenta027b86f70f15419da0a8de505e6230d40317e7c (diff)
Unbreak -stats on cocoa.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44919 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--AST/ASTContext.cpp7
-rw-r--r--test/Sema/carbon.c2
-rw-r--r--test/Sema/cocoa.m2
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<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)+
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 <Carbon/Carbon.h>
#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 <Cocoa/Cocoa.h>
#endif