summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-05-21 15:59:22 +0000
committerSteve Naroff <snaroff@apple.com>2008-05-21 15:59:22 +0000
commite181c13593f37823c9ed3128a202752f582d8615 (patch)
tree9fee8246fe72f88a4287f637d4da93b38485ab84 /clang/lib/AST/ASTContext.cpp
parent512d9412ec18292aa67c88180e89f2594462dc1c (diff)
downloadbcm5719-llvm-e181c13593f37823c9ed3128a202752f582d8615.tar.gz
bcm5719-llvm-e181c13593f37823c9ed3128a202752f582d8615.zip
Fixup ASTContext::PrintStats()...it was causing several test failures.
llvm-svn: 51380
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 12bbee2d9fc..3165ad065b2 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -50,6 +50,7 @@ void ASTContext::PrintStats() const {
unsigned NumTagStruct = 0, NumTagUnion = 0, NumTagEnum = 0, NumTagClass = 0;
unsigned NumObjCInterfaces = 0, NumObjCQualifiedInterfaces = 0;
unsigned NumObjCQualifiedIds = 0;
+ unsigned NumTypeOfTypes = 0, NumTypeOfExprs = 0;
for (unsigned i = 0, e = Types.size(); i != e; ++i) {
Type *T = Types[i];
@@ -86,6 +87,10 @@ void ASTContext::PrintStats() const {
++NumObjCQualifiedInterfaces;
else if (isa<ObjCQualifiedIdType>(T))
++NumObjCQualifiedIds;
+ else if (isa<TypeOfType>(T))
+ ++NumTypeOfTypes;
+ else if (isa<TypeOfExpr>(T))
+ ++NumTypeOfExprs;
else {
QualType(T, 0).dump();
assert(0 && "Unknown type!");
@@ -111,12 +116,16 @@ void ASTContext::PrintStats() const {
NumObjCQualifiedInterfaces);
fprintf(stderr, " %d protocol qualified id types\n",
NumObjCQualifiedIds);
+ fprintf(stderr, " %d typeof types\n", NumTypeOfTypes);
+ fprintf(stderr, " %d typeof exprs\n", NumTypeOfExprs);
+
fprintf(stderr, "Total bytes = %d\n", int(NumBuiltin*sizeof(BuiltinType)+
NumPointer*sizeof(PointerType)+NumArray*sizeof(ArrayType)+
NumComplex*sizeof(ComplexType)+NumVector*sizeof(VectorType)+
NumFunctionP*sizeof(FunctionTypeProto)+
NumFunctionNP*sizeof(FunctionTypeNoProto)+
- NumTypeName*sizeof(TypedefType)+NumTagged*sizeof(TagType)));
+ NumTypeName*sizeof(TypedefType)+NumTagged*sizeof(TagType)+
+ NumTypeOfTypes*sizeof(TypeOfType)+NumTypeOfExprs*sizeof(TypeOfExpr)));
}
OpenPOWER on IntegriCloud