[PATCH] D67699: [llvm-dwarfdump] Adjust Windows path to be acceptable by JSON

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 02:25:58 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL372378: [llvm-dwarfdump] Adjust Windows path to be acceptable by JSON (authored by djtodoro, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D67699?vs=220852&id=220986#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67699/new/

https://reviews.llvm.org/D67699

Files:
  llvm/trunk/tools/llvm-dwarfdump/Statistics.cpp


Index: llvm/trunk/tools/llvm-dwarfdump/Statistics.cpp
===================================================================
--- llvm/trunk/tools/llvm-dwarfdump/Statistics.cpp
+++ llvm/trunk/tools/llvm-dwarfdump/Statistics.cpp
@@ -5,6 +5,7 @@
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"
 #include "llvm/Object/ObjectFile.h"
+#include "llvm/Support/JSON.h"
 
 #define DEBUG_TYPE "dwarfdump"
 using namespace llvm;
@@ -92,11 +93,11 @@
   unsigned CallSiteParamDIEs = 0;
   /// Total byte size of concrete functions. This byte size includes
   /// inline functions contained in the concrete functions.
-  uint64_t FunctionSize = 0;
+  unsigned FunctionSize = 0;
   /// Total byte size of inlined functions. This is the total number of bytes
   /// for the top inline functions within concrete functions. This can help
   /// tune the inline settings when compiling to match user expectations.
-  uint64_t InlineFunctionSize = 0;
+  unsigned InlineFunctionSize = 0;
 };
 
 /// Holds accumulated debug location statistics about local variables and
@@ -449,11 +450,7 @@
 /// Print machine-readable output.
 /// The machine-readable format is single-line JSON output.
 /// \{
-static void printDatum(raw_ostream &OS, const char *Key, StringRef Value) {
-  OS << ",\"" << Key << "\":\"" << Value << '"';
-  LLVM_DEBUG(llvm::dbgs() << Key << ": " << Value << '\n');
-}
-static void printDatum(raw_ostream &OS, const char *Key, uint64_t Value) {
+static void printDatum(raw_ostream &OS, const char *Key, json::Value Value) {
   OS << ",\"" << Key << "\":" << Value;
   LLVM_DEBUG(llvm::dbgs() << Key << ": " << Value << '\n');
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67699.220986.patch
Type: text/x-patch
Size: 1670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/88b03934/attachment.bin>


More information about the llvm-commits mailing list