================
@@ -898,23 +898,29 @@ namespace {
}
class EnumArgument : public Argument {
- std::string type;
+ std::string fullType;
+ StringRef shortType;
std::vector<StringRef> values, enums, uniques;
+ bool isExternal;
public:
EnumArgument(const Record &Arg, StringRef Attr)
- : Argument(Arg, Attr), type(std::string(Arg.getValueAsString("Type"))),
- values(Arg.getValueAsListOfStrings("Values")),
+ : Argument(Arg, Attr), values(Arg.getValueAsListOfStrings("Values")),
enums(Arg.getValueAsListOfStrings("Enums")),
- uniques(uniqueEnumsInOrder(enums)) {
+ uniques(uniqueEnumsInOrder(enums)),
+ isExternal(Arg.getValueAsBit("External")) {
+ StringRef Type = Arg.getValueAsString("Type");
+ shortType = isExternal ? getAttrName().rsplit("::").second : Type;
----------------
erichkeane wrote:
Ah, hrmph... not that I know of. Perhaps this ends up being a bit more
annoying than I'd hoped, feel free to do it in a followup, but a
'negative-list' of common typo values (`;`, `:`, `.`, ` `, `$`, etc) might be
valuable?
https://github.com/llvm/llvm-project/pull/70835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits