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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 00:57:17 PST 2025


================
@@ -3533,6 +3533,35 @@ commaSeparatedValues(const llvm::opt::InputArgList &InputArgs, int ID) {
   return Values;
 }
 
+static void mcpuHelp() {
+  std::string Error;
+  Triple DummyTriple;
+
+  if (!TripleName.empty())
+    DummyTriple.setTriple(TripleName);
+  else {
+    // If the target triple is derived from the files, we display help message
----------------
jh7370 wrote:

I'm not sure it should matter whether the triple is derived from the files or specified explicitly? If `Disassemble` is true, we should always defer to the existing printing point to print help. Otherwise, if I'm not mistaken, you'll print the help output twice, for this case.

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


More information about the llvm-commits mailing list