[llvm] [PowerPC][AIX] Emit PowerPC version for XCOFF (PR #113214)

Kai Nacke via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 14:30:36 PDT 2024


redstar wrote:

There is already a `PPCTargetXCOFFStreamer::emitMachine()` method. Why can't this be used to emit the directive? It feels like the code is duplicating existing functionality.

E.g. the code in `AsmPrinter::doInitialization()` to emit the directive could move to `PPCAsmPrinter::emitStartOfAsmFile()`, because it is XCOFF+PowerPC specific. Then you have access to the `PPCTargetStreamer` to call `emitMachine()`. This avoids adding more XCOFF-specific functions to the global classes.

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


More information about the llvm-commits mailing list