No two elements of this array should be the same, but the standard library
may pass the same element as both arguments to this function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230293
91177308-0d34-0410-b5e6-
96231b3b80d8
// Sort the bit set entries for determinism.
std::sort(BitsetEntries.begin(), BitsetEntries.end(), [](llvm::MDTuple *T1,
llvm::MDTuple *T2) {
+ if (T1 == T2)
+ return false;
+
StringRef S1 = cast<llvm::MDString>(T1->getOperand(0))->getString();
StringRef S2 = cast<llvm::MDString>(T2->getOperand(0))->getString();
if (S1 < S2)