]> granicus.if.org Git - clang/commitdiff
cc1: Fix stats printing by default when using -mllvm -stats.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 26 Feb 2011 23:17:25 +0000 (23:17 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 26 Feb 2011 23:17:25 +0000 (23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126559 91177308-0d34-0410-b5e6-96231b3b80d8

tools/driver/cc1_main.cpp

index 7fb394fa5b01aed25d5a283c0b4b4aff871d8edf..ea130afb99b0e48f1c83cfcd75e487332bd8aef8 100644 (file)
@@ -168,7 +168,7 @@ int cc1_main(const char **ArgBegin, const char **ArgEnd,
 
   // When running with -disable-free, don't do any destruction or shutdown.
   if (Clang->getFrontendOpts().DisableFree) {
-    if (Clang->getFrontendOpts().ShowStats)
+    if (llvm::AreStatisticsEnabled || Clang->getFrontendOpts().ShowStats)
       llvm::PrintStatistics();
     Clang.take();
     return !Success;