[llvm] update llvm-dis header with available options (PR #108073)

Xiaofeng Tian via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 12:59:49 PDT 2024


https://github.com/txff99 updated https://github.com/llvm/llvm-project/pull/108073

>From bc9a9f15742c5832e4b4d5d2443f7c730d0d4ced Mon Sep 17 00:00:00 2001
From: Xiaofeng Tian <110771974+txff99 at users.noreply.github.com>
Date: Tue, 10 Sep 2024 12:25:39 -0700
Subject: [PATCH 1/4] update llvm-dis header with available options

---
 llvm/tools/llvm-dis/llvm-dis.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/llvm/tools/llvm-dis/llvm-dis.cpp b/llvm/tools/llvm-dis/llvm-dis.cpp
index d28af85bc739eb..e6c8997dc3b976 100644
--- a/llvm/tools/llvm-dis/llvm-dis.cpp
+++ b/llvm/tools/llvm-dis/llvm-dis.cpp
@@ -12,7 +12,12 @@
 //                            to the x.ll file.
 //  Options:
 //      --help   - Output information about command line switches
-//
+//      -o <filename>                  - Override output filename
+//      -f                             - Enable binary output on terminals
+//      --disable-output               - Don't output the .ll file
+//      --show-annotations             - Add informational comments to the .ll file
+//      --materialize-metadata         - Load module without materializing metadata, then materialize only the metadata
+// 
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Bitcode/BitcodeReader.h"

>From 48c86898dd4b65c9dab3961b88a8824321b37295 Mon Sep 17 00:00:00 2001
From: Xiaofeng Tian <110771974+txff99 at users.noreply.github.com>
Date: Tue, 10 Sep 2024 16:19:30 -0700
Subject: [PATCH 2/4] add complete llvm-dis options

---
 llvm/tools/llvm-dis/llvm-dis.cpp | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/llvm/tools/llvm-dis/llvm-dis.cpp b/llvm/tools/llvm-dis/llvm-dis.cpp
index e6c8997dc3b976..18b72f8cd4c84f 100644
--- a/llvm/tools/llvm-dis/llvm-dis.cpp
+++ b/llvm/tools/llvm-dis/llvm-dis.cpp
@@ -10,13 +10,24 @@
 //  llvm-dis [options]      - Read LLVM bitcode from stdin, write asm to stdout
 //  llvm-dis [options] x.bc - Read LLVM bitcode from the x.bc file, write asm
 //                            to the x.ll file.
-//  Options:
-//      --help   - Output information about command line switches
-//      -o <filename>                  - Override output filename
-//      -f                             - Enable binary output on terminals
-//      --disable-output               - Don't output the .ll file
-//      --show-annotations             - Add informational comments to the .ll file
-//      --materialize-metadata         - Load module without materializing metadata, then materialize only the metadata
+// Options:
+//
+// Color Options:
+//      --color                 - Use colors in output (default=autodetect)
+//
+// Disassembler Options:
+//      -f                      - Enable binary output on terminals
+//      --materialize-metadata  - Load module without materializing metadata,
+//                                then materialize only the metadata
+//      -o <filename>           - Override output filename
+//      --show-annotations      - Add informational comments to the .ll file
+//
+// Generic Options:
+//      --help                  - Display available options
+//                                (--help-hidden for more)
+//      --help-list             - Display list of available options
+//                                (--help-list-hidden for more)
+//      --version               - Display the version of this program
 // 
 //===----------------------------------------------------------------------===//
 

>From fca76153741337bbea19546fd795b1e68f41c3a8 Mon Sep 17 00:00:00 2001
From: Xiaofeng Tian <110771974+txff99 at users.noreply.github.com>
Date: Tue, 10 Sep 2024 22:22:30 -0700
Subject: [PATCH 3/4] fix identation

---
 llvm/tools/llvm-dis/llvm-dis.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/tools/llvm-dis/llvm-dis.cpp b/llvm/tools/llvm-dis/llvm-dis.cpp
index 18b72f8cd4c84f..a795fe325b8c91 100644
--- a/llvm/tools/llvm-dis/llvm-dis.cpp
+++ b/llvm/tools/llvm-dis/llvm-dis.cpp
@@ -10,19 +10,19 @@
 //  llvm-dis [options]      - Read LLVM bitcode from stdin, write asm to stdout
 //  llvm-dis [options] x.bc - Read LLVM bitcode from the x.bc file, write asm
 //                            to the x.ll file.
-// Options:
+//  Options:
 //
-// Color Options:
+//  Color Options:
 //      --color                 - Use colors in output (default=autodetect)
 //
-// Disassembler Options:
+//  Disassembler Options:
 //      -f                      - Enable binary output on terminals
 //      --materialize-metadata  - Load module without materializing metadata,
 //                                then materialize only the metadata
 //      -o <filename>           - Override output filename
 //      --show-annotations      - Add informational comments to the .ll file
 //
-// Generic Options:
+//  Generic Options:
 //      --help                  - Display available options
 //                                (--help-hidden for more)
 //      --help-list             - Display list of available options

>From ae800eb2c9442e2398bd9f1337bba71aef22d58e Mon Sep 17 00:00:00 2001
From: txff99 <txfff99 at gmail.com>
Date: Wed, 11 Sep 2024 12:59:37 -0700
Subject: [PATCH 4/4] fix clang-format

---
 llvm/tools/llvm-dis/llvm-dis.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/tools/llvm-dis/llvm-dis.cpp b/llvm/tools/llvm-dis/llvm-dis.cpp
index a795fe325b8c91..a3a62f042ddbd1 100644
--- a/llvm/tools/llvm-dis/llvm-dis.cpp
+++ b/llvm/tools/llvm-dis/llvm-dis.cpp
@@ -28,7 +28,7 @@
 //      --help-list             - Display list of available options
 //                                (--help-list-hidden for more)
 //      --version               - Display the version of this program
-// 
+//
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Bitcode/BitcodeReader.h"



More information about the llvm-commits mailing list