mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 14:56:27 +00:00
Remove different OpNames that target the same ID (#398)
This commit is contained in:
parent
810ba5d1e4
commit
9f6c91c278
@ -269,8 +269,8 @@ pub fn remove_duplicate_types(module: &mut Module) {
|
|||||||
.annotations
|
.annotations
|
||||||
.retain(|inst| anno_set.insert(inst.assemble()));
|
.retain(|inst| anno_set.insert(inst.assemble()));
|
||||||
// Same thing with OpName
|
// Same thing with OpName
|
||||||
let mut debug_set = HashSet::new();
|
let mut name_ids = HashSet::new();
|
||||||
module
|
module.debugs.retain(|inst| {
|
||||||
.debugs
|
inst.class.opcode != Op::Name || name_ids.insert(inst.operands[0].unwrap_id_ref())
|
||||||
.retain(|inst| debug_set.insert(inst.assemble()));
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user