[PATCH] D123702: [NVPTX] Disable parens for identifiers starting with '$'
Andrew Savonichev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 15 13:22:23 PDT 2022
asavonic added inline comments.
================
Comment at: llvm/lib/MC/MCAsmStreamer.cpp:2256
+ << "offset: " << F.getOffset() << ", value: ";
+ F.getValue()->print(OS, MAI);
+ OS << ", kind: " << Info.Name << "\n";
----------------
tra wrote:
> This is awkward.
> Perhaps we should consider adding some sort of `withMAI(F.getValue(), MAI)` -> std::pair<MCExpr*, MCAsmInfo*> wrapper and an overloaded `operator<<` to catch it and pass MAI along to MCExpr::print().
Well, this is how MCExpr is printed for assembly output - there are more than 50 occurrences in this file (also in MCTargetDesc). I personally find these two forms equally readable, so it's probably not worth it to refactor everything...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123702/new/
https://reviews.llvm.org/D123702
More information about the llvm-commits
mailing list