[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:58 PDT 2025


================
@@ -3533,6 +3533,21 @@ commaSeparatedValues(const llvm::opt::InputArgList &InputArgs, int ID) {
   return Values;
 }
 
+static int MCPUHelp() {
+  if (!TripleName.empty()) {
+    std::string Error;
+    Triple DummyTriple(TripleName);
+    const Target *DummyTarget =
+        TargetRegistry::lookupTarget(DummyTriple, Error);
+    if (!DummyTarget) {
+      outs() << Error << '\n';
----------------
jh7370 wrote:

Why is this writing an error to `stdout` not `stderr`. In fact, why is it not simply using the existing mechanism for reporting errors from llvm-objdump?

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


More information about the llvm-commits mailing list