[Lldb-commits] [lldb] [lldb] Generate option enums from TableGen (PR #224640)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 18 07:02:43 PDT 2026


================
@@ -48,48 +48,9 @@ class UUID;
 class VariableList;
 struct ModuleFunctionSearchOptions;
 
-static constexpr OptionEnumValueElement g_auto_download_enum_values[] = {
-    {
-        lldb::eSymbolDownloadOff,
-        "off",
-        "Disable automatically downloading symbols.",
-    },
-    {
-        lldb::eSymbolDownloadBackground,
-        "background",
-        "Download symbols in the background for images as they appear in the "
-        "backtrace.",
-    },
-    {
-        lldb::eSymbolDownloadForeground,
-        "foreground",
-        "Download symbols in the foreground for images as they appear in the "
-        "backtrace.",
-    },
-};
-
-static constexpr OptionEnumValueElement g_shared_cache_use_enum_values[] = {
-    {
-        lldb::eSymbolSharedCacheUseHostLLDBMemory,
-        "host-lldb-memory",
-        "Get binaries from the host lldb in-memory shared cache.",
-    },
-    {
-        lldb::eSymbolSharedCacheUseHostSharedCache,
-        "host-shared-cache",
-        "Get binaries from the host shared cache.",
-    },
-    {
-        lldb::eSymbolSharedCacheUseHostAndInferiorSharedCache,
-        "host-and-inferior-shared-cache",
-        "Get binaries from the host and inferior's shared caches.",
-    },
-    {
-        lldb::eSymbolSharedCacheUseInferiorSharedCacheOnly,
-        "inferior-shared-cache-only",
-        "Get binaries from inferior's shared cache only.",
-    },
-};
+#define LLDB_ENUMS_auto_download_enum_values
+#define LLDB_ENUMS_shared_cache_use_enum_values
----------------
Nerixyz wrote:

I used the same style of `#define`s before the include as for the other TableGen backends. They're scoped per enum, so in some cases, there are more than one `#defines` above.

https://github.com/llvm/llvm-project/pull/224640


More information about the lldb-commits mailing list