[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 1 07:10:05 PDT 2023
================
@@ -277,23 +277,28 @@ class DefaultIntArgument<string name, int default> : IntArgument<name, 1> {
int Default = default;
}
-// This argument is more complex, it includes the enumerator type name,
-// a list of strings to accept, and a list of enumerators to map them to.
+// This argument is more complex, it includes the enumerator type
+// name, whether the enum type is externally defined, a list of
+// strings to accept, and a list of enumerators to map them to.
class EnumArgument<string name, string type, list<string> values,
- list<string> enums, bit opt = 0, bit fake = 0>
+ list<string> enums, bit opt = 0, bit fake = 0,
+ bit external = 0>
: Argument<name, opt, fake> {
string Type = type;
list<string> Values = values;
list<string> Enums = enums;
+ bit External = external;
----------------
erichkeane wrote:
I could have sworn you changed this at one point... Something like `IsExternalType` is significantly more self-documenting here.
https://github.com/llvm/llvm-project/pull/70835
More information about the cfe-commits
mailing list