[OpaquePtr][BitcodeWriter] Handle attributes with types
For example, byval. Skip the type attribute auto-upgrade if we already have the type. I've actually seen this error of the ValueEnumerator missing a type attribute's type in a non-opaque pointer context. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D105138
This commit is contained in:
@@ -3333,6 +3333,9 @@ Error BitcodeReader::parseFunctionRecord(ArrayRef<uint64_t> Record) {
|
||||
if (!Func->hasParamAttribute(i, Kind))
|
||||
continue;
|
||||
|
||||
if (Func->getParamAttribute(i, Kind).getValueAsType())
|
||||
continue;
|
||||
|
||||
Func->removeParamAttr(i, Kind);
|
||||
|
||||
Type *PTy = cast<FunctionType>(FTy)->getParamType(i);
|
||||
|
||||
Reference in New Issue
Block a user