[BitcodeReader] Fixed null pointer dereferencing warning. NFCI.

This commit is contained in:
Dávid Bolvanský 2019-11-03 19:40:26 +01:00
parent a18a8db0d4
commit f39d95ea04
1 changed files with 1 additions and 0 deletions

View File

@ -3936,6 +3936,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
if ((I = UpgradeBitCastInst(Opc, Op, ResTy, Temp))) {
if (Temp) {
InstructionList.push_back(Temp);
assert(CurBB && "No current BB?");
CurBB->getInstList().push_back(Temp);
}
} else {