summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
committerpatrick <patrick@openbsd.org>2018-04-06 14:26:03 +0000
commitbdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch)
treec50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/Support/Statistic.cpp
parentPrint a 'p' flag for file descriptors that were opened after pledge(2). (diff)
downloadwireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz
wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/Support/Statistic.cpp')
-rw-r--r--gnu/llvm/lib/Support/Statistic.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/gnu/llvm/lib/Support/Statistic.cpp b/gnu/llvm/lib/Support/Statistic.cpp
index 72ca22806c4..544ae2d0983 100644
--- a/gnu/llvm/lib/Support/Statistic.cpp
+++ b/gnu/llvm/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";