[llvm] [PowerPC][AIX] Emit PowerPC version for XCOFF (PR #113214)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 14:05:32 PST 2024
================
@@ -423,7 +427,8 @@ class PPCTargetXCOFFStreamer : public PPCTargetStreamer {
}
void emitMachine(StringRef CPU) override {
- llvm_unreachable("Machine pseudo-ops are invalid for XCOFF.");
+ MCXCOFFStreamer &XCOFFStreamer = static_cast<MCXCOFFStreamer &>(Streamer);
+ XCOFFStreamer.getAssembler().getWriter().setCPU(CPU);
----------------
redstar wrote:
With the other changes this would become:
```suggestion
static_cast<XCOFFObjectWriter>(Streamer.getAssembler().getWriter()).setCPU(CPU);
```
https://github.com/llvm/llvm-project/pull/113214
More information about the llvm-commits
mailing list