summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 12:50:25 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-09 13:01:04 +0000
commit3fb832fe8bdc317687d5a4d2ca20f5f73b089341 (patch)
tree2e9a63c99306f766525fa958aeb3e769d3c1fb10 /llvm/lib/Support/Statistic.cpp
parenta35a44fd4b5e5b3c0bb9ca05e968b844b0c5e02d (diff)
downloadbcm5719-llvm-3fb832fe8bdc317687d5a4d2ca20f5f73b089341.tar.gz
bcm5719-llvm-3fb832fe8bdc317687d5a4d2ca20f5f73b089341.zip
Statistic - Fix shadow variable warning. NFCI.
Rename option 'Stats' to 'EnableStats' and prevent clash with StatisticInfo::Stats member
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r--llvm/lib/Support/Statistic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp
index 8b4177c7fba..ad5f0e98b7e 100644
--- a/llvm/lib/Support/Statistic.cpp
+++ b/llvm/lib/Support/Statistic.cpp
@@ -38,7 +38,7 @@ using namespace llvm;
/// -stats - Command line option to cause transformations to emit stats about
/// what they did.
///
-static cl::opt<bool> Stats(
+static cl::opt<bool> EnableStats(
"stats",
cl::desc("Enable statistics output from program (available with Asserts)"),
cl::Hidden);
@@ -104,7 +104,7 @@ void TrackingStatistic::RegisterStatistic() {
// Check Initialized again after acquiring the lock.
if (Initialized.load(std::memory_order_relaxed))
return;
- if (Stats || Enabled)
+ if (EnableStats || Enabled)
SI.addStatistic(this);
// Remember we have been registered.
@@ -119,7 +119,7 @@ StatisticInfo::StatisticInfo() {
// Print information when destroyed, iff command line option is specified.
StatisticInfo::~StatisticInfo() {
- if (::Stats || PrintOnExit)
+ if (EnableStats || PrintOnExit)
llvm::PrintStatistics();
}
@@ -129,7 +129,7 @@ void llvm::EnableStatistics(bool PrintOnExit) {
}
bool llvm::AreStatisticsEnabled() {
- return Enabled || Stats;
+ return Enabled || EnableStats;
}
void StatisticInfo::sort() {
OpenPOWER on IntegriCloud