We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649cbe4 commit 32ab097Copy full SHA for 32ab097
llvm/lib/IR/Metadata.cpp
@@ -282,7 +282,9 @@ void ReplaceableMetadataImpl::replaceAllUsesWith(Metadata *MD) {
282
// Copy out uses since UseMap will get touched below.
283
using UseTy = std::pair<void *, std::pair<OwnerTy, uint64_t>>;
284
SmallVector<UseTy, 8> Uses(UseMap.begin(), UseMap.end());
285
- llvm::sort(Uses, llvm::less_second());
+ llvm::sort(Uses, [](const UseTy &L, const UseTy &R) {
286
+ return L.second.second < R.second.second;
287
+ });
288
for (const auto &Pair : Uses) {
289
// Check that this Ref hasn't disappeared after RAUW (when updating a
290
// previous Ref).
0 commit comments