r272820 - cc1_main: Do not print statistics twice in -disable_free mode.
Matthias Braun via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 15 12:24:56 PDT 2016
Author: matze
Date: Wed Jun 15 14:24:55 2016
New Revision: 272820
URL: http://llvm.org/viewvc/llvm-project?rev=272820&view=rev
Log:
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
Modified:
cfe/trunk/tools/driver/cc1_main.cpp
Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=272820&r1=272819&r2=272820&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Wed Jun 15 14:24:55 2016
@@ -126,8 +126,6 @@ int cc1_main(ArrayRef<const char *> Argv
// 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;
}
More information about the cfe-commits
mailing list