diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-07 17:20:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-07 17:20:56 +0000 |
commit | c2ee10d79f70036af652a395ac1f8273f3d04e12 (patch) | |
tree | d6db3c7d97d104967ff017f0687d14bb0e658bb5 /lib/AST/ASTContext.cpp | |
parent | 82fc0cb7883747942326d6d6ca1333b27bd647f0 (diff) |
Move the internal DeclContext data structures into a separate header.
Simplify the addition of a case statement to a switch.
Fix -print-stats for attribute-qualified types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 99de7cbf59..307c0e4454 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -103,7 +103,8 @@ void ASTContext::PrintStats() const { unsigned NumObjCInterfaces = 0, NumObjCQualifiedInterfaces = 0; unsigned NumObjCQualifiedIds = 0; unsigned NumTypeOfTypes = 0, NumTypeOfExprTypes = 0; - + unsigned NumExtQual = 0; + for (unsigned i = 0, e = Types.size(); i != e; ++i) { Type *T = Types[i]; if (isa<BuiltinType>(T)) @@ -149,6 +150,8 @@ void ASTContext::PrintStats() const { ++NumTypeOfTypes; else if (isa<TypeOfExprType>(T)) ++NumTypeOfExprTypes; + else if (isa<ExtQualType>(T)) + ++NumExtQual; else { QualType(T, 0).dump(); assert(0 && "Unknown type!"); @@ -179,6 +182,7 @@ void ASTContext::PrintStats() const { NumObjCQualifiedIds); fprintf(stderr, " %d typeof types\n", NumTypeOfTypes); fprintf(stderr, " %d typeof exprs\n", NumTypeOfExprTypes); + fprintf(stderr, " %d attribute-qualified types\n", NumExtQual); fprintf(stderr, "Total bytes = %d\n", int(NumBuiltin*sizeof(BuiltinType)+ NumPointer*sizeof(PointerType)+NumArray*sizeof(ArrayType)+ @@ -189,7 +193,8 @@ void ASTContext::PrintStats() const { NumFunctionP*sizeof(FunctionProtoType)+ NumFunctionNP*sizeof(FunctionNoProtoType)+ NumTypeName*sizeof(TypedefType)+NumTagged*sizeof(TagType)+ - NumTypeOfTypes*sizeof(TypeOfType)+NumTypeOfExprTypes*sizeof(TypeOfExprType))); + NumTypeOfTypes*sizeof(TypeOfType)+NumTypeOfExprTypes*sizeof(TypeOfExprType)+ + NumExtQual*sizeof(ExtQualType))); } |