[lld] [llvm] [Coverage][WebAssembly] Keep InstrProf segments during gc (PR #172023)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 18:25:02 PST 2025


================
@@ -229,6 +229,7 @@ enum WasmSegmentFlag : unsigned {
   WASM_SEG_FLAG_STRINGS = 0x1,
   WASM_SEG_FLAG_TLS = 0x2,
   WASM_SEG_FLAG_RETAIN = 0x4,
----------------
Spxg wrote:

I understand that `WASM_SEG_FLAG_RETAIN` works to retain selected segments when `object->isLive()` is true. But `enqueueRetainedSegments` preserves all `__llvm_prf*` segments regardless of whether the object is live or not (since it appears `__llvm_covfun` is retained regardless of whether the object is live or not  — please correct me if I'm wrong).

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


More information about the llvm-commits mailing list