Skip to content

Commit 2f8ce7d

Browse files
committed
Emit OpTypeFloat operand count during deserialization error
1 parent ef930f4 commit 2f8ce7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,8 @@ LogicalResult spirv::Deserializer::processType(spirv::Opcode opcode,
870870
if (operands.size() != 2 && operands.size() != 3)
871871
return emitError(unknownLoc,
872872
"OpTypeFloat expects either 2 operands (type, bitwidth) "
873-
"or 3 operands (type, bitwidth, encoding)");
873+
"or 3 operands (type, bitwidth, encoding), but got ")
874+
<< operands.size();
874875
uint32_t bitWidth = operands[1];
875876

876877
Type floatTy;

0 commit comments

Comments
 (0)