[llvm] [llvm-debuginfo-analyzer] Add support for LLVM IR format. (PR #135440)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 03:41:43 PST 2026


================
@@ -2131,6 +2132,166 @@ layout and given the number of matches.
   -----------------------------
   Total           71          8
 
+IR (Textual representation and bitcode) SUPPORT
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The below example is used to show the IR output generated by
+:program:`llvm-debuginfo-analyzer`. We compiled the example for a
+IR 64-bit target with Clang (-O0 -g --target=x86_64-linux):
+
+.. code-block:: c++
+
+  1  using INTPTR = const int *;
+  2  int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) {
+  3    if (ParamBool) {
+  4      typedef int INTEGER;
+  5      const INTEGER CONSTANT = 7;
+  6      return CONSTANT;
+  7    }
+  8    return ParamUnsigned;
+  9  }
+
+PRINT BASIC DETAILS
+^^^^^^^^^^^^^^^^^^^
+The following command prints basic details for all the logical elements
+sorted by the debug information internal offset; it includes its lexical
----------------
CarlosAlbertoEnciso wrote:

I see your point.
As the main intention of the examples is to show how the different readers produce the logical view, instead of doing the change for the whole documentation as part of this patch, I created https://github.com/llvm/llvm-project/issues/180726 to use `--output-sort=id` for all readers examples.

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


More information about the llvm-commits mailing list