forked from OSchip/llvm-project
[spirv] Properly return when finding error in serialization
PiperOrigin-RevId: 280001339
This commit is contained in:
parent
c4a0883a92
commit
f4aca03232
|
@ -127,10 +127,9 @@ static void emitOperandSerialization(const Operator &op, ArrayRef<SMLoc> loc,
|
|||
os << tabs << " auto argID = getValueID(arg);\n";
|
||||
os << tabs << " if (!argID) {\n";
|
||||
os << tabs
|
||||
<< formatv(
|
||||
" emitError({0}.getLoc(), \"operand {1} has a use before "
|
||||
"def\");\n",
|
||||
opVar, operandNum);
|
||||
<< formatv(" return emitError({0}.getLoc(), "
|
||||
"\"operand #{1} has a use before def\");\n",
|
||||
opVar, operandNum);
|
||||
os << tabs << " }\n";
|
||||
os << tabs << formatv(" {0}.push_back(argID);\n", operands);
|
||||
os << " }\n";
|
||||
|
|
Loading…
Reference in New Issue