[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 11:15:47 PST 2019
dblaikie added inline comments.
================
Comment at: lib/ProfileData/InstrProfWriter.cpp:389-397
+ auto nameA = A.first;
+ auto nameB = B.first;
+ int comp = nameA.compare(nameB);
+ if (comp)
+ return comp < 0;
+
+ auto hashA = A.second.first;
----------------
I guess you could write this as:
return std::tie(A.first, A.second.first) < std::tie(B.first, B.second.first);
perhaps?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57986/new/
https://reviews.llvm.org/D57986
More information about the cfe-commits
mailing list