diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
commit | 8d69f488331dbfebdb425d9ef3c03ab9bc655143 (patch) | |
tree | e1cac432682cf043d9c6768b1c5aada4a359f2a6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 2abb108f1b92ffa60dd8a89d3c90eddabb5ea76f (diff) | |
download | bcm5719-llvm-8d69f488331dbfebdb425d9ef3c03ab9bc655143.tar.gz bcm5719-llvm-8d69f488331dbfebdb425d9ef3c03ab9bc655143.zip |
Commit missed files from nocapture change.
llvm-svn: 61240
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 279e447873c..adf49a524a3 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -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); |