mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 07:51:24 +00:00
add a missing check
llvm-svn: 36859
This commit is contained in:
1 parent
5db36d3d82
commit
a77bb942a2
1 file changed
+1
@@ -691,6 +691,7 @@ bool BitcodeReader::ParseConstants() {
|
||||
V = UndefValue::get(CurTy); // Unknown cast.
|
||||
} else {
|
||||
const Type *OpTy = getTypeByID(Record[1]);
|
||||
if (!OpTy) return Error("Invalid CE_CAST record");
|
||||
Constant *Op = ValueList.getConstantFwdRef(Record[2], OpTy);
|
||||
V = ConstantExpr::getCast(Opc, Op, CurTy);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user