Skip to content

Commit e8991ca

Browse files
committed
Revert "[DebugInfo] Prevent non-determinism when updating DIArgList users of a value"
Commit caused build errors on buildbots with [-Werror,-Wreturn-std-move] enabled. This reverts commit fa1de88.
1 parent fc6ec9b commit e8991ca

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/IR/Metadata.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,15 @@ bool MetadataTracking::isReplaceable(const Metadata &MD) {
196196
}
197197

198198
SmallVector<Metadata *, 4> ReplaceableMetadataImpl::getAllArgListUsers() {
199-
SmallVector<std::pair<OwnerTy, uint64_t> *> MDUsersWithID;
199+
SmallVector<Metadata *, 4> MDUsers;
200200
for (auto Pair : UseMap) {
201201
OwnerTy Owner = Pair.second.first;
202202
if (!Owner.is<Metadata *>())
203203
continue;
204204
Metadata *OwnerMD = Owner.get<Metadata *>();
205205
if (OwnerMD->getMetadataID() == Metadata::DIArgListKind)
206-
MDUsersWithID.push_back(&UseMap[Pair.first]);
206+
MDUsers.push_back(OwnerMD);
207207
}
208-
llvm::sort(MDUsersWithID, [](auto UserA, auto UserB) {
209-
return UserA->second < UserB->second;
210-
});
211-
SmallVector<Metadata *> MDUsers;
212-
for (auto UserWithID : MDUsersWithID)
213-
MDUsers.push_back(UserWithID->first.get<Metadata *>());
214208
return MDUsers;
215209
}
216210

0 commit comments

Comments
 (0)