[PATCH] D90040: [AsmPrinter] Use getMnemonic for instruction-mix remark.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 05:58:50 PST 2020


fhahn added inline comments.


================
Comment at: llvm/include/llvm/MC/MCStreamer.h:457
+  /// access to a instruction printer.
+  virtual StringRef getMnemonic(MCInst &MI) { return ""; }
+
----------------
paquette wrote:
> arsenm wrote:
> > paquette wrote:
> > > Would it make sense to make this return an `Optional` to make it clear that this may not necessarily return a mnemonic?
> > empty string works well enough
> yeah you're probably right
Thanks, I clarified the comment to mention when "" is returned. it should be easy to adjust, if there's a need or use case where `Optional` is more convenient.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90040/new/

https://reviews.llvm.org/D90040



More information about the llvm-commits mailing list