[Bitcode] Clarify that extractvalue/insertvalue constexprs are not supported

Bitcode currently cannot encode these. Throw a more obvious error
in this case, rather than failing an operand count assertion.
This commit is contained in:
Nikita Popov
2022-03-11 16:48:39 +01:00
parent 3aca0ffd50
commit a0d2b0aa65

View File

@@ -2653,6 +2653,10 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
Record.push_back(VE.getValueID(C->getOperand(1)));
Record.push_back(CE->getPredicate());
break;
case Instruction::ExtractValue:
case Instruction::InsertValue:
report_fatal_error("extractvalue/insertvalue constexprs not supported");
break;
}
} else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
Code = bitc::CST_CODE_BLOCKADDRESS;