mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +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:
parent
82e791dc42
commit
bfcc38040b
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user