Normalize passes keep spans and clean warnings

This commit is contained in:
nyash-codex
2025-11-24 15:02:51 +09:00
parent 466e636af6
commit da1a5558e5
40 changed files with 547 additions and 362 deletions

View File

@ -508,8 +508,8 @@ mod tests {
let f = module.get_function("main").unwrap();
let block = f.get_block(bb0).unwrap();
let has_typeop = block
.all_instructions()
.any(|i| matches!(i, MirInstruction::TypeOp { .. }));
.all_spanned_instructions()
.any(|sp| matches!(sp.inst, MirInstruction::TypeOp { .. }));
assert!(
has_typeop,
"TypeOp should not be dropped by DCE when used by console.log (ExternCall)"