Skip to content

Commit ff25184

Browse files
authored
Make NoopStatistic constructor constexpr (NFC) (#159045)
This makes it friendly to -Wglobal-constructors environments. This class is used when Statistics are disabled, the matching class, TrackingStatistic, was made constexpr a while back already in 7e5682e for other reasons.
1 parent fba26bc commit ff25184

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ADT/Statistic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ class TrackingStatistic {
131131

132132
class NoopStatistic {
133133
public:
134-
NoopStatistic(const char * /*DebugType*/, const char * /*Name*/,
135-
const char * /*Desc*/) {}
134+
constexpr NoopStatistic(const char * /*DebugType*/, const char * /*Name*/,
135+
const char * /*Desc*/) {}
136136

137137
uint64_t getValue() const { return 0; }
138138

0 commit comments

Comments
 (0)