summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-29 01:43:29 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-29 01:43:29 +0000
commit60011b8e2703e1bed7add86d00c00edcb5047527 (patch)
treeac27b231f3b84fe528368a36565343c7f7657a3a /llvm/lib/Bitcode
parent9a629abf3d9211aaaf96f66b7bf6f2fe99414bc3 (diff)
downloadbcm5719-llvm-60011b8e2703e1bed7add86d00c00edcb5047527.tar.gz
bcm5719-llvm-60011b8e2703e1bed7add86d00c00edcb5047527.zip
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
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 2e1a5125fe9..ca299c007c6 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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));
OpenPOWER on IntegriCloud