================
@@ -653,15 +653,26 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
OS << getModRefStr(OtherMR);
}
+ bool TargetPrintedForAll = false;
for (auto Loc : MemoryEffects::locations()) {
ModRefInfo MR = ME.getModRef(Loc);
if (MR == OtherMR)
continue;
- if (!First)
+ if (!First && !TargetPrintedForAll)
OS << ", ";
First = false;
+ if (ME.isTargetMemLoc(Loc) && ME.isTargetMemLocSameForAll()) {
----------------
nikic wrote:
I think 1. would be the right thing to do, as this location is effectively
display only -- the target_mem location is fully covered by the target_memN
locations, so it can't really have its own completely independent value.
I think for now it's okay to leave things as-is here, and deal with this when
the number of target location becomes > 2.
https://github.com/llvm/llvm-project/pull/176968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits