Skip to content

Commit

Permalink
Partially revert "Use llvm::less_second (NFC)"
Browse files Browse the repository at this point in the history
This reverts part of commit e0039b8.

This should fix the issue reported in:

#62546
  • Loading branch information
kazutakahirata committed May 16, 2023
1 parent 649cbe4 commit 32ab097
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/lib/IR/Metadata.cpp
Expand Up @@ -282,7 +282,9 @@ void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
// Copy out uses since UseMap will get touched below.
using UseTy = std::pair<void *, std::pair<OwnerTy, uint64_t>>;
SmallVector<UseTy, 8> Uses(UseMap.begin(), UseMap.end());
llvm::sort(Uses, llvm::less_second());
llvm::sort(Uses, [](const UseTy &L, const UseTy &R) {
return L.second.second < R.second.second;
});
for (const auto &Pair : Uses) {
// Check that this Ref hasn't disappeared after RAUW (when updating a
// previous Ref).
Expand Down

0 comments on commit 32ab097

Please sign in to comment.