[PATCH] D133611: [clang] sort additional module maps when serializing
Richard Howell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:01:03 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3c1b42347b3a: [clang] sort additional module maps when serializing (authored by rmaz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133611/new/
https://reviews.llvm.org/D133611
Files:
clang/lib/Serialization/ASTWriter.cpp
Index: clang/lib/Serialization/ASTWriter.cpp
===================================================================
--- clang/lib/Serialization/ASTWriter.cpp
+++ clang/lib/Serialization/ASTWriter.cpp
@@ -1282,7 +1282,12 @@
if (auto *AdditionalModMaps =
Map.getAdditionalModuleMapFiles(WritingModule)) {
Record.push_back(AdditionalModMaps->size());
- for (const FileEntry *F : *AdditionalModMaps)
+ SmallVector<const FileEntry *, 1> ModMaps(AdditionalModMaps->begin(),
+ AdditionalModMaps->end());
+ llvm::sort(ModMaps, [](const FileEntry *A, const FileEntry *B) {
+ return A->getName() < B->getName();
+ });
+ for (const FileEntry *F : ModMaps)
AddPath(F->getName(), Record);
} else {
Record.push_back(0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133611.459532.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220912/6fc74fe7/attachment.bin>
More information about the cfe-commits
mailing list