Commit missed files from nocapture change.

llvm-svn: 61240
This commit is contained in:
Nick Lewycky
2008-12-19 09:38:31 +00:00
parent 2abb108f1b
commit 8d69f48833
5 changed files with 49 additions and 14 deletions

View File

@@ -122,7 +122,17 @@ static void WriteAttributeTable(const ValueEnumerator &VE,
for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) {
const AttributeWithIndex &PAWI = A.getSlot(i);
Record.push_back(PAWI.Index);
Record.push_back(PAWI.Attrs);
// FIXME: remove in LLVM 3.0
// Store the alignment in the bitcode as a 16-bit raw value instead of a
// 5-bit log2 encoded value. Shift the bits above the alignment up by
// 11 bits.
uint64_t FauxAttr = PAWI.Attrs & 0xffff;
if (PAWI.Attrs & Attribute::Alignment)
FauxAttr |= (1ull<<16)<<(((PAWI.Attrs & Attribute::Alignment)-1) >> 16);
FauxAttr |= (PAWI.Attrs & (0x3FFull << 21)) << 11;
Record.push_back(FauxAttr);
}
Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY, Record);