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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-02-12 08:13:50 +00:00
parent 105ea3d49d
commit 48fbcfe6b9
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;
}
}
}
}