[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
================
@@ -132,8 +133,10 @@ bool CodeGenTargetMachineImpl::addAsmPrinter(PassManagerBase &PM,
MCContext &Context) {
Expected<std::unique_ptr<MCStreamer>> MCStreamerOrErr =
createMCStreamer(Out, DwoOut, FileType, Context);
- if (auto Err = MCStreamerOrErr.takeError())
+ if (auto Err = MCStreamerOrErr.takeError()) {
+ Context.reportError(SMLoc(), toString(std::move(Err)));
----------------
s-barannikov wrote:
---
(nit) Could avoid moving the Error twice:
```suggestion
if (!MCStreamerOrErr) {
Context.reportError(SMLoc(), toString(MCStreamerOrErr.takeError()));
```
https://github.com/llvm/llvm-project/pull/121078
More information about the llvm-commits
mailing list