[cfe-commits] r51380 - /cfe/trunk/lib/AST/ASTContext.cpp
Steve Naroff
snaroff at apple.com
Wed May 21 08:59:22 PDT 2008
Author: snaroff
Date: Wed May 21 10:59:22 2008
New Revision: 51380
URL: http://llvm.org/viewvc/llvm-project?rev=51380&view=rev
Log:
Fixup ASTContext::PrintStats()...it was causing several test failures.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=51380&r1=51379&r2=51380&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed May 21 10:59:22 2008
@@ -50,6 +50,7 @@
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 @@
++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 @@
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)));
}
More information about the cfe-commits
mailing list