reg_alloc: Insert braces around DEBUG_ASSERT

DEBUG_ASSERT becomes an empty statement in release-mode; an if statement
with an empty statement produces a compiler warning.
This commit is contained in:
MerryMage 2016-08-24 01:31:34 +01:00
parent dc26afbd7e
commit 13908c5a58

View file

@ -120,8 +120,9 @@ Gen::X64Reg RegAlloc::UseDefRegister(IR::Inst* use_inst, IR::Inst* def_inst, Hos
} }
bool is_floating_point = HostLocIsXMM(*desired_locations.begin()); bool is_floating_point = HostLocIsXMM(*desired_locations.begin());
if (is_floating_point) if (is_floating_point) {
DEBUG_ASSERT(use_inst->GetType() == IR::Type::F32 || use_inst->GetType() == IR::Type::F64); DEBUG_ASSERT(use_inst->GetType() == IR::Type::F32 || use_inst->GetType() == IR::Type::F64);
}
Gen::X64Reg use_reg = UseRegister(use_inst, is_floating_point ? any_xmm : any_gpr); Gen::X64Reg use_reg = UseRegister(use_inst, is_floating_point ? any_xmm : any_gpr);
Gen::X64Reg def_reg = DefRegister(def_inst, desired_locations); Gen::X64Reg def_reg = DefRegister(def_inst, desired_locations);
if (is_floating_point) { if (is_floating_point) {