Skip to content

Commit

Permalink
Remove different OpNames that target the same ID (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
khyperia authored Jan 28, 2021
1 parent 810ba5d commit 9f6c91c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/rustc_codegen_spirv/src/linker/duplicates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ pub fn remove_duplicate_types(module: &mut Module) {
.annotations
.retain(|inst| anno_set.insert(inst.assemble()));
// Same thing with OpName
let mut debug_set = HashSet::new();
module
.debugs
.retain(|inst| debug_set.insert(inst.assemble()));
let mut name_ids = HashSet::new();
module.debugs.retain(|inst| {
inst.class.opcode != Op::Name || name_ids.insert(inst.operands[0].unwrap_id_ref())
});
}

0 comments on commit 9f6c91c

Please sign in to comment.