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

Daniel Petrovic via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 00:11:13 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; }
+  void setLifetime(Lifetime L) { LifeState = L; }
+};
+static_assert(sizeof(LocalInlineDescriptor) == sizeof(void *), "");
----------------
daniel-petrovic wrote:

the empty "" is not required (c++17) .. otherwise an error message would be more helpful

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


More information about the cfe-commits mailing list