[clang] [lld] [llvm] [WebAssembly] Emit constant initializers for addrspace(1) globals (PR #212007)
Yuta Saito via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 22:29:23 PDT 2026
================
@@ -237,6 +239,26 @@ static wasm::WasmLimits defaultLimits() {
return {wasm::WASM_LIMITS_FLAG_NONE, 0, 0, 0};
}
+// Compare only the union member the opcode selects: bytes past it are
+// uninitialized.
+static bool sameInitExpr(const wasm::WasmInitExprMVP &A,
----------------
kateinoigakukun wrote:
How about making this an `operator==` on `wasm::WasmInitExprMVP` (or `WasmInitExpr`) in `BinaryFormat/Wasm.h` instead of a file-static here? It's the natural home next to the union it interprets.
https://github.com/llvm/llvm-project/pull/212007
More information about the llvm-commits
mailing list