[PATCH] D113477: [clang-tblgen] Fix non-determinism in generating AttributeReference.rst
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 19:09:59 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b7ea8e62921: [clang-tblgen] Fix non-determinism in generating AttributeReference.rst (authored by ikudrin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113477/new/
https://reviews.llvm.org/D113477
Files:
clang/utils/TableGen/ClangAttrEmitter.cpp
Index: clang/utils/TableGen/ClangAttrEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangAttrEmitter.cpp
+++ clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -4433,7 +4433,13 @@
// Gather the Documentation lists from each of the attributes, based on the
// category provided.
std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
- std::map<const Record *, std::vector<DocumentationData>> SplitDocs;
+ struct CategoryLess {
+ bool operator()(const Record *L, const Record *R) const {
+ return L->getValueAsString("Name") < R->getValueAsString("Name");
+ }
+ };
+ std::map<const Record *, std::vector<DocumentationData>, CategoryLess>
+ SplitDocs;
for (const auto *A : Attrs) {
const Record &Attr = *A;
std::vector<Record *> Docs = Attr.getValueAsListOfDefs("Documentation");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113477.386041.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211110/242ad774/attachment.bin>
More information about the llvm-commits
mailing list