[llvm] [llc] Add -M for InstPrinter options (PR #121078)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 19:38:48 PST 2024
================
@@ -163,6 +166,10 @@ CodeGenTargetMachineImpl::createMCStreamer(raw_pwrite_stream &Out,
getTargetTriple(),
Options.MCOptions.OutputAsmVariant.value_or(MAI.getAssemblerDialect()),
MAI, MII, MRI);
+ for (StringRef Opt : Options.MCOptions.InstPrinterOptions)
+ if (!InstPrinter->applyTargetSpecificCLOption(Opt))
+ return createStringError(inconvertibleErrorCode(),
+ "invalid InstPrinter option '" + Opt + "'");
----------------
s-barannikov wrote:
---
(nit) There is an overload accepting `Twine`:
```suggestion
return createStringError("invalid InstPrinter option '" + Opt + "'");
```
https://github.com/llvm/llvm-project/pull/121078
More information about the llvm-commits
mailing list