[clang] [clang][bytecode] Add `LocalInlineDesc` for local variables (PR #239505)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 00:17:23 PST 2026


================
@@ -57,6 +57,18 @@ enum class Lifetime : uint8_t {
   Ended,
 };
 
+struct alignas(void *) LocalInlineDescriptor {
+  bool IsEnabled;
+  bool IsInitialized;
+  Lifetime LifeState;
+
+  LocalInlineDescriptor()
+      : IsEnabled(false), IsInitialized(false), LifeState(Lifetime::Started) {}
+  Lifetime getLifetime() const { return LifeState; }
----------------
tbaederr wrote:

I experimented with a bitfield before. Other than that, it gets rid of the awkward "LifeState" name in public API.

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


More information about the cfe-commits mailing list