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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 01:35:57 PDT 2025


================
@@ -3826,6 +3841,10 @@ int llvm_objdump_main(int argc, char **argv, const llvm::ToolContext &) {
       !DisassembleSymbols.empty())
     Disassemble = true;
 
+  if (!Disassemble && MCPU == "help") {
+    return MCPUHelp();
+  }
----------------
jh7370 wrote:

[No braces for single-line conditionals](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements).

The return will prevent other llvm-objdump functionality from executing, if `--mcpu=help` but NOT `--disassemble` or similar. Previously, if `--mcpu=help` was specified, the other operations still printed as normal. I think we should retain this behaviour, i.e. don't `return` here.

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


More information about the llvm-commits mailing list