From ea1ea974ebc22227ee61a14c2d1848cab328d1e2 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 11 Sep 2017 19:25:17 -0600 Subject: [PATCH] Address #1052: Have language-level exits of case statements. --- SPIRV/SPVRemapper.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index e8031d02..bc7f4788 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -215,14 +215,19 @@ namespace spv { bool spirvbin_t::isConstOp(spv::Op opCode) const { switch (opCode) { - case spv::OpConstantNull: error("unimplemented constant type"); - case spv::OpConstantSampler: error("unimplemented constant type"); + case spv::OpConstantNull: + case spv::OpConstantSampler: + error("unimplemented constant type"); + return true; case spv::OpConstantTrue: case spv::OpConstantFalse: case spv::OpConstantComposite: - case spv::OpConstant: return true; - default: return false; + case spv::OpConstant: + return true; + + default: + return false; } }