[PATCH] D45164: [MC] Change AsmParser to leverage Assembler during evaluation

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 11 09:36:53 PDT 2018


rnk added a comment.

In https://reviews.llvm.org/D45164#1064411, @niravd wrote:

> I have not found any documentation giving guarantees about the correspondence between output types, but it seem natural to me that direct object generation may be more permissive than compilation through assembly hence this patch. There already appear to be additional restrictions in the AsmStreamer (e.g. dwarf CUID) over the ObjectStreamer so this isn't a new thing.


I'm also not that concerned about this difference.

> That said, modulo the extra bookkeeping costs for textual assembly additional checks for incomplete assemblers, there's no real reason why MCAsmStreamer and MCObjectStreamer are separate structures and it would be good to eventually merge them.

Why? What would you replace the MCStreamer interface virtual dispatch with? Would MCStreamer become the main implementation, with every method checking `if (emitTextualAssembly) OS << ".foo";`? That doesn't seem like a clear win.


Repository:
  rL LLVM

https://reviews.llvm.org/D45164





More information about the llvm-commits mailing list