From 13908c5a58042cccd6b0494487a64d08f21484ae Mon Sep 17 00:00:00 2001 From: MerryMage Date: Wed, 24 Aug 2016 01:31:34 +0100 Subject: [PATCH] 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. --- src/backend_x64/reg_alloc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend_x64/reg_alloc.cpp b/src/backend_x64/reg_alloc.cpp index 82e32446..25d77f40 100644 --- a/src/backend_x64/reg_alloc.cpp +++ b/src/backend_x64/reg_alloc.cpp @@ -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()); - if (is_floating_point) + if (is_floating_point) { 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 def_reg = DefRegister(def_inst, desired_locations); if (is_floating_point) {