[BitCode] Make sure atomicrmw's argument is an actual PointerType

llvm-svn: 271851
This commit is contained in:
Filipe Cabecinhas
2016-06-05 18:43:40 +00:00
parent 036e73c8bf
commit 6328f8e9e6
3 changed files with 6 additions and 0 deletions

View File

@@ -5340,6 +5340,7 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) {
unsigned OpNum = 0;
Value *Ptr, *Val;
if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) ||
!isa<PointerType>(Ptr->getType()) ||
popValue(Record, OpNum, NextValueNo,
cast<PointerType>(Ptr->getType())->getElementType(), Val) ||
OpNum+4 != Record.size())