aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-12 08:13:50 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-12 08:13:50 +0000
commit48fbcfe6b959df628a6455e00ac8d94fa6ade87a (patch)
treeb125ec2996eb832ece56dfb9cbd68aad3f5e6bfe /lib/Bitcode/Reader/BitcodeReader.cpp
parent105ea3d49d4a458af8779ae7f144f00d19c4168f (diff)
downloadexternal_llvm-48fbcfe6b959df628a6455e00ac8d94fa6ade87a.zip
external_llvm-48fbcfe6b959df628a6455e00ac8d94fa6ade87a.tar.gz
external_llvm-48fbcfe6b959df628a6455e00ac8d94fa6ade87a.tar.bz2
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/BitcodeReader.cpp')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 476c68a..f348843 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;
+ }
}
}
}