summaryrefslogtreecommitdiff
path: root/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
commit044eb2f6afba375a914ac9d8024f8f5142bb912e (patch)
tree1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /lib/Support/Statistic.cpp
parenteb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff)
Notes
Diffstat (limited to 'lib/Support/Statistic.cpp')
-rw-r--r--lib/Support/Statistic.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp
index 72ca22806c43c..544ae2d0983c9 100644
--- a/lib/Support/Statistic.cpp
+++ b/lib/Support/Statistic.cpp
@@ -39,12 +39,14 @@ using namespace llvm;
/// -stats - Command line option to cause transformations to emit stats about
/// what they did.
///
-static cl::opt<bool> Stats("stats",
- cl::desc("Enable statistics output from program (available with Asserts)"));
-
+static cl::opt<bool> Stats(
+ "stats",
+ cl::desc("Enable statistics output from program (available with Asserts)"),
+ cl::Hidden);
static cl::opt<bool> StatsAsJSON("stats-json",
- cl::desc("Display statistics as json data"));
+ cl::desc("Display statistics as json data"),
+ cl::Hidden);
static bool Enabled;
static bool PrintOnExit;
@@ -166,9 +168,10 @@ void llvm::PrintStatisticsJSON(raw_ostream &OS) {
const char *delim = "";
for (const Statistic *Stat : Stats.Stats) {
OS << delim;
- assert(!yaml::needsQuotes(Stat->getDebugType()) &&
+ assert(yaml::needsQuotes(Stat->getDebugType()) == yaml::QuotingType::None &&
"Statistic group/type name is simple.");
- assert(!yaml::needsQuotes(Stat->getName()) && "Statistic name is simple");
+ assert(yaml::needsQuotes(Stat->getName()) == yaml::QuotingType::None &&
+ "Statistic name is simple");
OS << "\t\"" << Stat->getDebugType() << '.' << Stat->getName() << "\": "
<< Stat->getValue();
delim = ",\n";