Have the bitcode writer and reader handle the new attribute references.

The bitcode writer emits a reference to the attribute group that the object at
the given index refers to. The bitcode reader is modified to read this in and
map it back to the attribute group.

llvm-svn: 174952
This commit is contained in:
Bill Wendling
2013-02-12 08:13:50 +00:00
parent a096b14d1d
commit 0dc08915d2
2 changed files with 11 additions and 33 deletions

View File

@@ -494,6 +494,14 @@ bool BitcodeReader::ParseAttributeBlock() {
Attrs.clear();
break;
}
case bitc::PARAMATTR_CODE_ENTRY: { // ENTRY: [attrgrp0, attrgrp1, ...]
for (unsigned i = 0, e = Record.size(); i != e; ++i)
Attrs.push_back(MAttributeGroups[Record[i]]);
MAttributes.push_back(AttributeSet::get(Context, Attrs));
Attrs.clear();
break;
}
}
}
}