summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-27 17:48:06 +0000
committerChris Lattner <sabre@nondot.org>2007-11-27 17:48:06 +0000
commit1dfc48d4f6eddf9e4d3a41a357897c1762931c40 (patch)
tree37057c007fbfb7553ae0fe74c06169df0f4f5667 /llvm/lib/Bitcode/Writer
parentad0ea2d430f8bcd0b7f6730fa48f918638876055 (diff)
downloadbcm5719-llvm-1dfc48d4f6eddf9e4d3a41a357897c1762931c40.tar.gz
bcm5719-llvm-1dfc48d4f6eddf9e4d3a41a357897c1762931c40.zip
Unbreak backwards compatibility with bytecode format. Regression
introduced by this patch: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071126/055824.html llvm-svn: 44364
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 9249c70209f..6d111fa36e3 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -147,6 +147,7 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
Abbv = new BitCodeAbbrev();
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_FUNCTION));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isvararg
+ Abbv->Add(BitCodeAbbrevOp(0)); // FIXME: DEAD value, remove in LLVM 3.0
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
Log2_32_Ceil(VE.getTypes().size()+1)));
@@ -204,9 +205,10 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
case Type::FunctionTyID: {
const FunctionType *FT = cast<FunctionType>(T);
- // FUNCTION: [isvararg, retty, paramty x N]
+ // FUNCTION: [isvararg, attrid, retty, paramty x N]
Code = bitc::TYPE_CODE_FUNCTION;
TypeVals.push_back(FT->isVarArg());
+ TypeVals.push_back(0); // FIXME: DEAD: remove in llvm 3.0
TypeVals.push_back(VE.getTypeID(FT->getReturnType()));
for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i)
TypeVals.push_back(VE.getTypeID(FT->getParamType(i)));
OpenPOWER on IntegriCloud