[BitcodeReader] propagateAttributeTypes(): fix opaque pointer handling
Can't get the pointee type of an opaque pointer, but in that case said attributes must already be typed, so just don't try to rewrite them if they already are.
This commit is contained in:
@@ -3857,7 +3857,8 @@ void BitcodeReader::propagateAttributeTypes(CallBase *CB,
|
||||
for (unsigned i = 0; i != CB->arg_size(); ++i) {
|
||||
for (Attribute::AttrKind Kind : {Attribute::ByVal, Attribute::StructRet,
|
||||
Attribute::InAlloca}) {
|
||||
if (!CB->paramHasAttr(i, Kind))
|
||||
if (!CB->paramHasAttr(i, Kind) ||
|
||||
CB->getParamAttr(i, Kind).getValueAsType())
|
||||
continue;
|
||||
|
||||
CB->removeParamAttr(i, Kind);
|
||||
|
||||
Reference in New Issue
Block a user