From 48fbcfe6b959df628a6455e00ac8d94fa6ade87a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 12 Feb 2013 08:13:50 +0000 Subject: 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 --- lib/Bitcode/Reader/BitcodeReader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp') 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; + } } } } -- cgit v1.2.3-18-g5258