ir_opt/verification_pass: Mark locals as const where applicable

Makes our immutable state a little more explicit.
This commit is contained in:
Lioncash 2019-04-11 18:30:28 -04:00
parent d02eef2fac
commit e244bf4f68
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -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);