1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2024-12-22 04:02:03 +00:00

Assert when an OpId has an invalid result type

This commit is contained in:
ReinUsesLisp 2021-02-19 15:42:25 -03:00
parent 200310e8fa
commit 20d75babd0

View file

@ -29,6 +29,11 @@ namespace Sirit {
class Declarations;
struct OpId {
OpId(spv::Op opcode_) : opcode{opcode_} {}
OpId(spv::Op opcode_, Id result_type_) : opcode{opcode_}, result_type{result_type_} {
assert(result_type.value != 0);
}
spv::Op opcode{};
Id result_type{};
};