mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-02 04:34:43 +01:00
verification_pass: show type errors
This commit is contained in:
parent
dad7724b86
commit
9782e7da3f
4 changed files with 35 additions and 13 deletions
|
|
@ -20,7 +20,10 @@ void VerificationPass(const IR::Block& block) {
|
|||
for (size_t i = 0; i < inst.NumArgs(); i++) {
|
||||
IR::Type t1 = inst.GetArg(i).GetType();
|
||||
IR::Type t2 = IR::GetArgTypeOf(inst.GetOpcode(), i);
|
||||
ASSERT(t1 == t2 || t1 == IR::Type::Opaque || t2 == IR::Type::Opaque);
|
||||
if (t1 != t2 && t1 != IR::Type::Opaque && t2 != IR::Type::Opaque) {
|
||||
puts(IR::DumpBlock(block).c_str());
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue