[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:26 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
+# RUN: llvm-objdump --mcpu=help --triple=x86_64 -d %t 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK-HELP,CHECK-X86,CHECK-DISASM
+
+## Check if we can handle multiple files
+# RUN: llvm-objdump --mcpu=help %t %t 2>&1 \
+# RUN:   | FileCheck %s --check-prefixes=CHECK-MULTI-FILE,CHECK-HELP,CHECK-ARM
----------------
jh7370 wrote:

What has this to do with `--triple`?

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


More information about the llvm-commits mailing list