Hahnfeld added a comment. I think this patch is right in also sorting the function names: AFAICS `StringMap` doesn't provide that guarantee.
================ Comment at: lib/ProfileData/InstrProfWriter.cpp:393-403 + llvm::sort(OrderedFuncData, [](const RecordType &A, const RecordType &B) { + auto nameA = A.first; + auto nameB = B.first; + int comp = nameA.compare(nameB); + if (comp) + return comp < 0; + ---------------- Please run `clang-format`, the lambda should only be indented by two additional spaces. Also can you put the explicit types for `nameA` et al.? That should be `StringRef` and `uint64_t` for the hashes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits