dexonsmith added a comment. https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Metadata.cpp#L716 is where the auto-detection of self-references is:
// Drop uniquing for self-reference cycles and deleted constants. if (New == this || (!New && Old && isa<ConstantAsMetadata>(Old))) { if (!isResolved()) resolve(); storeDistinctInContext(); return; } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90079/new/ https://reviews.llvm.org/D90079 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits