================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits