mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
add a missing check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -691,6 +691,7 @@ bool BitcodeReader::ParseConstants() {
|
|||||||
V = UndefValue::get(CurTy); // Unknown cast.
|
V = UndefValue::get(CurTy); // Unknown cast.
|
||||||
} else {
|
} else {
|
||||||
const Type *OpTy = getTypeByID(Record[1]);
|
const Type *OpTy = getTypeByID(Record[1]);
|
||||||
|
if (!OpTy) return Error("Invalid CE_CAST record");
|
||||||
Constant *Op = ValueList.getConstantFwdRef(Record[2], OpTy);
|
Constant *Op = ValueList.getConstantFwdRef(Record[2], OpTy);
|
||||||
V = ConstantExpr::getCast(Opc, Op, CurTy);
|
V = ConstantExpr::getCast(Opc, Op, CurTy);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user