[BitcodeReader] Handle type attributes more explicitly (NFCI)
For attributes in legacy bitcode that are now typed, explicitly create a type attribute with nullptr type, the same as we do for the attribute group representation. This is so we can assert use of the correct constructor in the future.
This commit is contained in:
@@ -1280,6 +1280,8 @@ static void addRawAttributeValue(AttrBuilder &B, uint64_t Val) {
|
||||
B.addAlignmentAttr(1ULL << ((A >> 16) - 1));
|
||||
else if (I == Attribute::StackAlignment)
|
||||
B.addStackAlignmentAttr(1ULL << ((A >> 26)-1));
|
||||
else if (Attribute::isTypeAttrKind(I))
|
||||
B.addTypeAttr(I, nullptr); // Type will be auto-upgraded.
|
||||
else
|
||||
B.addAttribute(I);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user