From f3fc338e37d38c490b4ce22d99c32efd7245865a Mon Sep 17 00:00:00 2001 From: bd1976bris Date: Wed, 2 Oct 2024 19:18:33 +0100 Subject: [PATCH 1/2] [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 8adccf1c0c0a3..e72bb66d0bf8a 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= + + Output JSON-formatted error summary to the a file specfied by + . 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=` is:: + + { + "error-categories": { + "": {"count": 1234}, + "": {"count": 4321} + }, + "error-count": 5555 + } + +The following is generated if there are no errors reported:: + + { + "error-categories": {}, + "error-count": 0 + } + EXIT STATUS ----------- From 134f940cdb699f5ec0b874781f25f04a4cd76041 Mon Sep 17 00:00:00 2001 From: bd1976bris Date: Thu, 3 Oct 2024 09:19:34 +0100 Subject: [PATCH 2/2] Fix invalid option reference --- llvm/docs/CommandGuide/llvm-dwarfdump.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/docs/CommandGuide/llvm-dwarfdump.rst b/llvm/docs/CommandGuide/llvm-dwarfdump.rst index e72bb66d0bf8a..829f8a146b310 100644 --- a/llvm/docs/CommandGuide/llvm-dwarfdump.rst +++ b/llvm/docs/CommandGuide/llvm-dwarfdump.rst @@ -207,7 +207,7 @@ For aggregated values, the following keys are used: FORMAT OF VERIFY JSON OUTPUT ---------------------------- -The format of the JSON output created by the :option:`--verify-json=` is:: +The format of the JSON output created by the :option:`--verify-json` is:: { "error-categories": {