mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 14:10:58 +00:00
Bitcode: More precise casting. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286750 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e1f5c817e8
commit
77a1226498
@ -3479,7 +3479,7 @@ Error BitcodeReader::parseConstants() {
|
||||
|
||||
if (PointeeType &&
|
||||
PointeeType !=
|
||||
cast<SequentialType>(Elts[0]->getType()->getScalarType())
|
||||
cast<PointerType>(Elts[0]->getType()->getScalarType())
|
||||
->getElementType())
|
||||
return error("Explicit gep operator type does not match pointee type "
|
||||
"of pointer operand");
|
||||
@ -4733,10 +4733,10 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
return error("Invalid record");
|
||||
|
||||
if (!Ty)
|
||||
Ty = cast<SequentialType>(BasePtr->getType()->getScalarType())
|
||||
Ty = cast<PointerType>(BasePtr->getType()->getScalarType())
|
||||
->getElementType();
|
||||
else if (Ty !=
|
||||
cast<SequentialType>(BasePtr->getType()->getScalarType())
|
||||
cast<PointerType>(BasePtr->getType()->getScalarType())
|
||||
->getElementType())
|
||||
return error(
|
||||
"Explicit gep type does not match pointee type of pointer operand");
|
||||
|
Loading…
Reference in New Issue
Block a user