aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/cc1_main.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-30 05:39:52 +0000
committerChris Lattner <sabre@nondot.org>2010-03-30 05:39:52 +0000
commit30bc7e8e560941f730fd94109e81ac600767b0ab (patch)
tree51f348b906fbd229a78ae75fef418f098e11e5c6 /tools/driver/cc1_main.cpp
parentbfb7a1d6eba6714bd71db921092332da65b774c0 (diff)
make -ftime-report work even in -disable-free mode. Woo, finally.
rdar://7781603 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver/cc1_main.cpp')
-rw-r--r--tools/driver/cc1_main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
index ec7fed7ec9..5770a1a115 100644
--- a/tools/driver/cc1_main.cpp
+++ b/tools/driver/cc1_main.cpp
@@ -31,6 +31,7 @@
#include "llvm/ADT/OwningPtr.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Target/TargetSelect.h"
@@ -272,6 +273,10 @@ int cc1_main(const char **ArgBegin, const char **ArgEnd,
}
}
+ // If any timers were active but haven't been destroyed yet, print their
+ // results now. This happens in -disable-free mode.
+ llvm::TimerGroup::printAll(llvm::errs());
+
// When running with -disable-free, don't do any destruction or shutdown.
if (Clang->getFrontendOpts().DisableFree) {
Clang.take();