From: Steve Naroff Date: Wed, 21 May 2008 15:59:22 +0000 (+0000) Subject: Fixup ASTContext::PrintStats()...it was causing several test failures. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cc189648ade1d1c838f6bf22ffa0016d56393d3;p=clang Fixup ASTContext::PrintStats()...it was causing several test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51380 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 12bbee2d9f..3165ad065b 100644 --- a/lib/AST/ASTContext.cpp +++ b/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(T)) ++NumObjCQualifiedIds; + else if (isa(T)) + ++NumTypeOfTypes; + else if (isa(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))); }