From 0dc08915d2178be6d265ebc98d01edf8c46e9ab8 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. llvm-svn: 174952 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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; + } } } } -- cgit v1.2.3