Address #1052: Have language-level exits of case statements.

This commit is contained in:
John Kessenich 2017-09-11 19:25:17 -06:00
parent d004e5ca4c
commit ea1ea974eb

View File

@ -215,14 +215,19 @@ namespace spv {
bool spirvbin_t::isConstOp(spv::Op opCode) const bool spirvbin_t::isConstOp(spv::Op opCode) const
{ {
switch (opCode) { switch (opCode) {
case spv::OpConstantNull: error("unimplemented constant type"); case spv::OpConstantNull:
case spv::OpConstantSampler: error("unimplemented constant type"); case spv::OpConstantSampler:
error("unimplemented constant type");
return true;
case spv::OpConstantTrue: case spv::OpConstantTrue:
case spv::OpConstantFalse: case spv::OpConstantFalse:
case spv::OpConstantComposite: case spv::OpConstantComposite:
case spv::OpConstant: return true; case spv::OpConstant:
default: return false; return true;
default:
return false;
} }
} }