summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-26 01:27:23 +0000
committerChris Lattner <sabre@nondot.org>2007-01-26 01:27:23 +0000
commit4eb445d2a13696e10a056e46ce091f3a9d55570c (patch)
treea425318a43d9ccc5c4698db229c32c50d53702aa /clang/Driver/clang.cpp
parent01a7c5364f67fe1dfc19a6e2d23b856517a51584 (diff)
downloadbcm5719-llvm-4eb445d2a13696e10a056e46ce091f3a9d55570c.tar.gz
bcm5719-llvm-4eb445d2a13696e10a056e46ce091f3a9d55570c.zip
start gather stats on types processed. carbon.h currently yields:
*** AST Context Stats: 30594 types total. 19 builtin types 3929 pointer types 308 array types 18883 function types with proto 8 function types with no proto 2988 typename (typedef) types 4459 tagged types 1476 struct types 80 union types 0 class types 2903 enum types 83298 slow type lookups Next up, making type canonicalization not trivially silly. llvm-svn: 39305
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index f5e291d8b8a..dcaf92eae81 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -808,6 +808,12 @@ static void BuildASTs(Preprocessor &PP, unsigned MainFileID) {
ASTStreamerTy *Streamer = ASTStreamer_Init(Context, MainFileID);
while (ASTStreamer_ReadTopLevelDecl(Streamer))
/* keep reading */;
+
+ if (Stats) {
+ std::cerr << "\nSTATISTICS:\n";
+ ASTStreamer_PrintStats(Streamer);
+ Context.PrintStats();
+ }
ASTStreamer_Terminate(Streamer);
}
@@ -866,6 +872,12 @@ static void PrintASTs(Preprocessor &PP, unsigned MainFileID) {
}
}
+ if (Stats) {
+ std::cerr << "\nSTATISTICS:\n";
+ ASTStreamer_PrintStats(Streamer);
+ Context.PrintStats();
+ }
+
ASTStreamer_Terminate(Streamer);
}
OpenPOWER on IntegriCloud