[PATCH] D75218: Make asm printer for X86 use custom separator instead of hard-coded tabs.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 13:04:42 PST 2020


oontvoo marked 3 inline comments as done.
oontvoo added a comment.
Herald added a subscriber: wuzish.

Updated the patch to include the change in other printers. PTAL. Thanks!



================
Comment at: llvm/include/llvm/MC/MCInstPrinter.h:62
 
+  /// Separator string, canonically "\t".
+  std::string Separator = "\t";
----------------
courbet wrote:
> Given that this is only used by the X86 backend, why is it in the target-independent abstraction ?
> I think it would make sense to either:
>  - Keep this here, but keep the behaviour consistent between all targets (e.g. AArch64 also uses '\t' as its separator). You might even be able to get rid of `supportsCustomSeparator`
>  - Move this to X86, and replace `virtual bool supportCustomSeparator()` + `void setSeparator()` by   `virtual bool setSeparator()`. If more targets start opting in, then the code can be moved back to the target-independent abstraction.
I've updated the patch to change other printers, too.



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

https://reviews.llvm.org/D75218





More information about the llvm-commits mailing list