[PATCH] D76289: [NFC][Attr TableGen] Emit Spelling Enum for Attr types if there >1
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 17 10:44:14 PDT 2020
erichkeane updated this revision to Diff 250818.
erichkeane marked 2 inline comments as done.
erichkeane added a comment.
Did as @rnk suggested, and it fixed all the problems. Just changed the logic for emitting the enum.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76289/new/
https://reviews.llvm.org/D76289
Files:
clang/utils/TableGen/ClangAttrEmitter.cpp
Index: clang/utils/TableGen/ClangAttrEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangAttrEmitter.cpp
+++ clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -2329,7 +2329,7 @@
SemanticSpellingMap SemanticToSyntacticMap;
std::string SpellingEnum;
- if (!ElideSpelling)
+ if (Spellings.size() > 1)
SpellingEnum = CreateSemanticSpellings(Spellings, SemanticToSyntacticMap);
if (Header)
OS << SpellingEnum;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76289.250818.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200317/09e3ce02/attachment.bin>
More information about the cfe-commits
mailing list