mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-30 18:31:53 +00:00
Use an AttrBuilder to generate the correct AttributeSet.
We no longer accept an encoded integer as representing all of the attributes. Convert this via the AttrBuilder class into an AttributeSet with the correct representation (an AttributeSetImpl that holds a list of Attribute objects). llvm-svn: 173750
This commit is contained in:
1 parent
9a629abf3d
commit
60011b8e27
3 files changed
+24
-24
No files matched your search
@@ -464,15 +464,10 @@ bool BitcodeReader::ParseAttributeBlock() {
|
||||
return Error("Invalid ENTRY record");
|
||||
|
||||
for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
|
||||
Attribute ReconstitutedAttr =
|
||||
AttributeFuncs::decodeLLVMAttributesForBitcode(Context, Record[i+1]);
|
||||
Record[i+1] = ReconstitutedAttr.Raw();
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
|
||||
AttrBuilder B(Record[i+1]);
|
||||
if (B.hasAttributes())
|
||||
Attrs.push_back(AttributeSet::get(Context, Record[i], B));
|
||||
AttrBuilder B;
|
||||
AttributeFuncs::decodeLLVMAttributesForBitcode(Context, B,
|
||||
Record[i+1]);
|
||||
Attrs.push_back(AttributeSet::get(Context, Record[i], B));
|
||||
}
|
||||
|
||||
MAttributes.push_back(AttributeSet::get(Context, Attrs));
|
||||
|
||||
Reference in new issue
Block a user