mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
[opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr.
Also a couple of other changes to avoid use of PointerType::getElementType here & there too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236799 91177308-0d34-0410-b5e6-96231b3b80d8
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