================
@@ -1090,9 +1084,11 @@
linkAndWrapDeviceFiles(ArrayRef<SmallVector<OffloadFile>> LinkerInputFiles,
// We sort the entries before bundling so they appear in a deterministic
// order in the final binary.
llvm::sort(Input, [](OffloadingImage &A, OffloadingImage &B) {
- return A.StringData["triple"] > B.StringData["triple"] ||
- A.StringData["arch"] > B.StringData["arch"] ||
- A.TheOffloadKind < B.TheOffloadKind;
+ if (A.StringData.lookup("triple") != B.StringData.lookup("triple"))
+ return A.StringData.lookup("triple") > B.StringData.lookup("triple");
+ if (A.StringData.lookup("arch") != B.StringData.lookup("arch"))
----------------
arsenm wrote:
Shouldn't repeatedly be doing the same lookup
https://github.com/llvm/llvm-project/pull/183679
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits