[llvm] [llvm-objdump] Add triple support to `mcpu=help` (PR #165661)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 00:14:28 PST 2025


================
@@ -0,0 +1,33 @@
+# RUN: yaml2obj %s -o %t
+# REQUIRES: arm-registered-target,x86-registered-target
+
+## Check if we can handle without -d
+# RUN: llvm-objdump --mcpu=help %t 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK-HELP,CHECK-ARM
+
+## Check if we can handle without file
+# RUN: not llvm-objdump --mcpu=help --triple=arm 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK-HELP,CHECK-ARM
+
+## Check triple priority
----------------
jh7370 wrote:

What do you mean by "priority" here? Be more explicit about saying what the expected behaviour.

More generally, a better comment format for tests is "Show that under X conditions, llvm-objdump does Y."

Two minor nits: don't start comments with "Check" because automated tools that look for possible FileCheck mistakes will pick them up. Also, comments should end wiht '.', just like in C++ code.

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


More information about the llvm-commits mailing list