summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0dc08915d2178be6d265ebc98d01edf8c46e9ab8 (patch)
tree7459a9223a0f16b63bf887031cd63acb3a7b5f2f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parenta096b14d1d973f2bc40b2108cfbeedeacdcc42d1 (diff)
downloadbcm5719-llvm-0dc08915d2178be6d265ebc98d01edf8c46e9ab8.tar.gz
bcm5719-llvm-0dc08915d2178be6d265ebc98d01edf8c46e9ab8.zip
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 476c68a6c0a..f34884391a7 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/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;
+ }
}
}
}
OpenPOWER on IntegriCloud