Skip to content

Commit 32ab097

Browse files
Partially revert "Use llvm::less_second (NFC)"
This reverts part of commit e0039b8. This should fix the issue reported in: #62546
1 parent 649cbe4 commit 32ab097

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/IR/Metadata.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
282282
// Copy out uses since UseMap will get touched below.
283283
using UseTy = std::pair<void *, std::pair<OwnerTy, uint64_t>>;
284284
SmallVector<UseTy, 8> Uses(UseMap.begin(), UseMap.end());
285-
llvm::sort(Uses, llvm::less_second());
285+
llvm::sort(Uses, [](const UseTy &L, const UseTy &R) {
286+
return L.second.second < R.second.second;
287+
});
286288
for (const auto &Pair : Uses) {
287289
// Check that this Ref hasn't disappeared after RAUW (when updating a
288290
// previous Ref).

0 commit comments

Comments
 (0)