[opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr.
Also a couple of other changes to avoid use of PointerType::getElementType here & there too. llvm-svn: 236799
This commit is contained in:
@@ -3523,10 +3523,12 @@ std::error_code BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
if (getValueTypePair(Record, OpNum, NextValueNo, BasePtr))
|
||||
return Error("Invalid record");
|
||||
|
||||
if (Ty &&
|
||||
Ty !=
|
||||
cast<SequentialType>(BasePtr->getType()->getScalarType())
|
||||
->getElementType())
|
||||
if (!Ty)
|
||||
Ty = cast<SequentialType>(BasePtr->getType()->getScalarType())
|
||||
->getElementType();
|
||||
else if (Ty !=
|
||||
cast<SequentialType>(BasePtr->getType()->getScalarType())
|
||||
->getElementType())
|
||||
return Error(
|
||||
"Explicit gep type does not match pointee type of pointer operand");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user