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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-binary-utilities

Author: bd1976bris (bd1976bris)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/110909.diff


1 Files Affected:

- (modified) llvm/docs/CommandGuide/llvm-dwarfdump.rst (+28) 


``````````diff
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
 -----------
 

``````````

</details>


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


More information about the llvm-commits mailing list