diff options
author | Matthias Braun <matze@braunis.de> | 2016-06-15 19:24:55 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-06-15 19:24:55 +0000 |
commit | 64b34088df61c46c67c0e2e40ad51701c21d6e44 (patch) | |
tree | 99a711ca1095ac69c6ef303c9ff03940917d29ad /tools/driver | |
parent | 5cb252b75b931724bb687e1419e4e57dbff11a12 (diff) |
cc1_main: Do not print statistics twice in -disable_free mode.
llvm statistics are currently printed when the destructor of a "static
ManagedStatic<StatisticInfo> StatInfo" in llvm runs. This destructor
currently runs in each case as part of llvm_shutdown() which is run even
in disable_free mode as part of main(). I assume that this hasn't always
been the case.
Removing the special code here avoids the statistics getting printed
twice.
Differential Revision: http://reviews.llvm.org/D21338
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r-- | tools/driver/cc1_main.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp index df315b8c0a..d78a31e67a 100644 --- a/tools/driver/cc1_main.cpp +++ b/tools/driver/cc1_main.cpp @@ -126,8 +126,6 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) { // When running with -disable-free, don't do any destruction or shutdown. if (Clang->getFrontendOpts().DisableFree) { - if (llvm::AreStatisticsEnabled() || Clang->getFrontendOpts().ShowStats) - llvm::PrintStatistics(); BuryPointer(std::move(Clang)); return !Success; } |