[llvm] [llvm-objdump] Support --mcpu=help/--mattr=help without -d (PR #165661)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 01:11:07 PST 2025


================
@@ -1,12 +1,38 @@
 # RUN: yaml2obj %s -o %t
-# RUN: llvm-objdump -d %t --mattr=help 2>&1 | FileCheck %s
-# RUN: llvm-objdump -d %t --mcpu=help 2>&1 | FileCheck %s
 # REQUIRES: x86-registered-target
 
+# RUN: llvm-objdump -d %t --mattr=help 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-DISASSEMBLE
+# RUN: llvm-objdump -d %t --mcpu=help 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-DISASSEMBLE
+
+## The help message can be printed without -d.
+# RUN: llvm-objdump --mattr=help %t 2>&1 \
+# RUN:   | FileCheck %s --check-prefix=CHECK
----------------
jh7370 wrote:

Here (and in the --mcpu=help case on the next line), I think it would be worth showing that disassembly is NOT printed.

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


More information about the llvm-commits mailing list