Skip to content

Commit af02986

Browse files
committed
Statistic - Fix MSVC shadow warning against global PrintOnExit static variable. NFC.
1 parent 013f4ba commit af02986

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/ADT/Statistic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ using Statistic = NoopStatistic;
173173
static llvm::TrackingStatistic VARNAME = {DEBUG_TYPE, #VARNAME, DESC}
174174

175175
/// Enable the collection and printing of statistics.
176-
void EnableStatistics(bool PrintOnExit = true);
176+
void EnableStatistics(bool DoPrintOnExit = true);
177177

178178
/// Check if statistics are enabled.
179179
bool AreStatisticsEnabled();

llvm/lib/Support/Statistic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ StatisticInfo::~StatisticInfo() {
123123
llvm::PrintStatistics();
124124
}
125125

126-
void llvm::EnableStatistics(bool PrintOnExit) {
126+
void llvm::EnableStatistics(bool DoPrintOnExit) {
127127
Enabled = true;
128-
::PrintOnExit = PrintOnExit;
128+
PrintOnExit = DoPrintOnExit;
129129
}
130130

131131
bool llvm::AreStatisticsEnabled() {

0 commit comments

Comments
 (0)