diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-12-16 19:06:48 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-12-16 19:06:48 +0000 |
commit | 6fa311c2338391b0f332c062b3140c6df139a949 (patch) | |
tree | 63dc423c8a0f40da76553a2c95d7fba71ec86851 /lib/Bitcode | |
parent | 905ff1ebc4f383088e6af6fc37504cd06ba62b57 (diff) | |
download | external_llvm-6fa311c2338391b0f332c062b3140c6df139a949.zip external_llvm-6fa311c2338391b0f332c062b3140c6df139a949.tar.gz external_llvm-6fa311c2338391b0f332c062b3140c6df139a949.tar.bz2 |
Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 14 | ||||
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 12 |
2 files changed, 1 insertions, 25 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 2d994d4..f06c61d 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -362,20 +362,6 @@ bool BitcodeReader::ParseAttributeBlock() { Attributes RetAttribute = Attribute::None; Attributes FnAttribute = Attribute::None; for (unsigned i = 0, e = Record.size(); i != e; i += 2) { - // FIXME: remove in LLVM 3.0 - // The alignment is stored as a 16-bit raw value from bits 31--16. - // We shift the bits above 31 down by 11 bits. - - unsigned Alignment = (Record[i+1] & (0xffffull << 16)) >> 16; - if (Alignment && !isPowerOf2_32(Alignment)) - return Error("Alignment is not a power of two."); - - Attributes ReconstitutedAttr = Record[i+1] & 0xffff; - if (Alignment) - ReconstitutedAttr |= Attribute::constructAlignmentFromInt(Alignment); - ReconstitutedAttr |= (Record[i+1] & (0xffffull << 32)) >> 11; - Record[i+1] = ReconstitutedAttr; - if (Record[i] == 0) RetAttribute = Record[i+1]; else if (Record[i] == ~0U) diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index adf49a5..279e447 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -122,17 +122,7 @@ 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); - - // 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); + Record.push_back(PAWI.Attrs); } Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY, Record); |