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 | b1fe2c90016197752ca86bf8ef18086dcf2cf96c (patch) | |
| tree | 8c54fdc57c5506760a19f323f2568fb5ece7c9fb /clang/lib/AST/ASTContext.cpp | |
| parent | 88056a97f22f03255d26c4fc77aa4d5ecd06d845 (diff) | |
| download | bcm5719-llvm-b1fe2c90016197752ca86bf8ef18086dcf2cf96c.tar.gz bcm5719-llvm-b1fe2c90016197752ca86bf8ef18086dcf2cf96c.zip | |
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.
llvm-svn: 68522
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 99de7cbf59b..307c0e4454a 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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))); } |

