OSDN Git Service

Format the dwarfdump --statistics version as an integer instead of a string.
authorAdrian Prantl <aprantl@apple.com>
Fri, 5 Oct 2018 17:41:30 +0000 (17:41 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 5 Oct 2018 17:41:30 +0000 (17:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343864 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-dwarfdump/X86/statistics.ll
tools/llvm-dwarfdump/Statistics.cpp

index 52570c6..ab3d49c 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: llc -O0 %s -o - -filetype=obj \
 ; RUN:   | llvm-dwarfdump -statistics - | FileCheck %s
+; CHECK: "version":1
 
 ; int GlobalConst = 42;
 ; int Global;
index a2b4de7..45e96d5 100644 (file)
@@ -250,7 +250,7 @@ bool collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx,
 
   // Print summary.
   OS.SetBufferSize(1024);
-  OS << "{\"version\":\"" << Version << '"';
+  OS << "{\"version\":" << Version;
   LLVM_DEBUG(llvm::dbgs() << "Variable location quality metrics\n";
              llvm::dbgs() << "---------------------------------\n");
   printDatum(OS, "file", Filename.str());