[llvm] [doc] Add --verify-json to dwarfdump documentation (PR #110909)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 11:32:33 PDT 2024


https://github.com/bd1976bris created https://github.com/llvm/llvm-project/pull/110909

This adds documentation for --verify-json, see: https://github.com/llvm/llvm-project/pull/81762.

Note: GitHub won't seem to allow me add the original author @kevinfrei as a reviewer for some reason.

>From f3fc338e37d38c490b4ce22d99c32efd7245865a Mon Sep 17 00:00:00 2001
From: bd1976bris <bd1976llvm at gmail.com>
Date: Wed, 2 Oct 2024 19:18:33 +0100
Subject: [PATCH] [doc] Add --verify-json to dwarfdump documentation

---
 llvm/docs/CommandGuide/llvm-dwarfdump.rst | 28 +++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/llvm/docs/CommandGuide/llvm-dwarfdump.rst b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
index 8adccf1c0c0a31..e72bb66d0bf8ad 100644
--- a/llvm/docs/CommandGuide/llvm-dwarfdump.rst
+++ b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
@@ -150,6 +150,12 @@ OPTIONS
             compile unit chains, DIE relationships graph, address
             ranges, and more.
 
+.. option:: --verify-json=<path>
+
+            Output JSON-formatted error summary to the a file specfied by
+            <path>. Implies :option:`--verify`.  The output format is described
+            in the section below (:ref:`verify-json-format`).
+
 .. option:: --version
 
             Display the version of the tool.
@@ -196,6 +202,28 @@ For aggregated values, the following keys are used:
       - `#variables - entry values ...` ==> the number of variables excluding
         the entry values etc.
 
+.. _verify-json-format:
+
+FORMAT OF VERIFY JSON OUTPUT
+----------------------------
+
+The format of the JSON output created by the :option:`--verify-json=<path>` is::
+
+  { 
+    "error-categories": { 
+      "<first category description>": {"count": 1234},
+      "<next category description>": {"count": 4321}
+    },
+    "error-count": 5555
+  }
+
+The following is generated if there are no errors reported::
+
+  { 
+    "error-categories": {},
+    "error-count": 0
+  }
+
 EXIT STATUS
 -----------
 



More information about the llvm-commits mailing list