ir_opt/verification_pass: Mark locals as const where applicable
Makes our immutable state a little more explicit.
This commit is contained in:
parent
d02eef2fac
commit
e244bf4f68
@ -20,8 +20,8 @@ void VerificationPass(const IR::Block& block) {
|
||||
for (const auto& inst : block) {
|
||||
const size_t num_args = inst.NumArgs();
|
||||
for (size_t i = 0; i < num_args; i++) {
|
||||
IR::Type t1 = inst.GetArg(i).GetType();
|
||||
IR::Type t2 = IR::GetArgTypeOf(inst.GetOpcode(), i);
|
||||
const IR::Type t1 = inst.GetArg(i).GetType();
|
||||
const IR::Type t2 = IR::GetArgTypeOf(inst.GetOpcode(), i);
|
||||
if (!IR::AreTypesCompatible(t1, t2)) {
|
||||
puts(IR::DumpBlock(block).c_str());
|
||||
ASSERT(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user