Clear orphaned entries from value symtab when editing DXIL

This commit is contained in:
baldurk
2024-08-05 17:40:31 +01:00
parent 90832a18f0
commit 9ef756d626
+4
View File
@@ -947,6 +947,10 @@ static void ConvertToFixedDXILAmpFeeder(const DXBC::DXBCContainer *dxbc, uint32_
RDCASSERT(payloadType && payloadType->type == Type::Struct);
payloadType->members.append({i32, i32, i32, i32});
f->valueSymtabOrder.removeIf([](const Value *v) {
return v->kind() == ValueKind::Instruction || v->kind() == ValueKind::BasicBlock;
});
// recreate the function with our own instructions
f->instructions.clear();
f->blocks.resize(1);