[llvm] [Offload] Define `_NUM_VARIANTS` macros for generated enumerations (PR #147314)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 04:45:55 PDT 2025
================
@@ -151,6 +151,12 @@ static void ProcessEnum(const EnumRec &Enum, raw_ostream &OS) {
Enum.getEnumValNamePrefix());
OS << formatv("} {0};\n", Enum.getName());
+
+ // Add field for the number of variants
+ OS << formatv(TAB_1
----------------
jhuber6 wrote:
It's the common way to do it, I'd favor the last enum unless it's easier with just a number.
https://github.com/llvm/llvm-project/pull/147314
More information about the llvm-commits
mailing list