diff options
author | Frederich Munch <colsebas@hotmail.com> | 2017-06-14 19:16:22 +0000 |
---|---|---|
committer | Frederich Munch <colsebas@hotmail.com> | 2017-06-14 19:16:22 +0000 |
commit | dceb612eeb9563f990688cec8f540f4ca720535f (patch) | |
tree | 8c6d6cb0e7b419f2420f6b3e03f6096a5308f520 /llvm/lib/Support/DebugCounter.cpp | |
parent | f0e26e72704425d3bb78811313e1639230d69a01 (diff) | |
download | bcm5719-llvm-dceb612eeb9563f990688cec8f540f4ca720535f.tar.gz bcm5719-llvm-dceb612eeb9563f990688cec8f540f4ca720535f.zip |
Hide dbgs() stream for when built with -fmodules.
Summary: Make DebugCounter::print and dump methods to be const correct.
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34214
llvm-svn: 305408
Diffstat (limited to 'llvm/lib/Support/DebugCounter.cpp')
-rw-r--r-- | llvm/lib/Support/DebugCounter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index a10ac8e8539..1d46de04ee6 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/lib/Support/DebugCounter.cpp @@ -102,9 +102,13 @@ void DebugCounter::push_back(const std::string &Val) { } } -void DebugCounter::print(raw_ostream &OS) { +void DebugCounter::print(raw_ostream &OS) const { OS << "Counters and values:\n"; for (const auto &KV : Counters) OS << left_justify(RegisteredCounters[KV.first], 32) << ": {" << KV.second.first << "," << KV.second.second << "}\n"; } + +LLVM_DUMP_METHOD void DebugCounter::dump() const { + print(dbgs()); +} |