diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-12 08:13:50 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-12 08:13:50 +0000 |
commit | 48fbcfe6b959df628a6455e00ac8d94fa6ade87a (patch) | |
tree | b125ec2996eb832ece56dfb9cbd68aad3f5e6bfe /lib/Bitcode/Reader | |
parent | 105ea3d49d4a458af8779ae7f144f00d19c4168f (diff) |
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
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 476c68a6c0..f34884391a 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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; + } } } } |