[clang] [lld] [llvm] [WebAssembly] Emit constant initializers for addrspace(1) globals (PR #212007)

Max Desiatov via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 09:54:05 PDT 2026


================
@@ -28,6 +28,7 @@ class MCSymbolWasm : public MCSymbol {
   wasm::WasmSignature *Signature = nullptr;
   std::optional<wasm::WasmGlobalType> GlobalType;
   std::optional<wasm::WasmTableType> TableType;
+  std::optional<uint64_t> GlobalInitValue;
----------------
MaxDesiatov wrote:

We need LLDB to be able to read a value of a global (this one specifically https://github.com/swiftlang/swift/blob/a0706b4f6aeab27683629ecca7292ce8121c5b10/stdlib/public/Concurrency/Actor.cpp#L3123), the value of which is known at compile-time, but we don't want to parse any DWARF for that. @felipepiovezan can elaborate if you're interested in the implementation details of the LLDB's Swift support.

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


More information about the cfe-commits mailing list