diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-27 17:48:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-27 17:48:06 +0000 |
commit | 70b644d0f77e7a3810d4628de99f3c417521b842 (patch) | |
tree | 72f448f573196a2985627422c9c9a95f70f98a3c /lib/Bitcode/Writer | |
parent | f5588dc4ec43da1e4423e5ff2394669c0f000350 (diff) | |
download | external_llvm-70b644d0f77e7a3810d4628de99f3c417521b842.zip external_llvm-70b644d0f77e7a3810d4628de99f3c417521b842.tar.gz external_llvm-70b644d0f77e7a3810d4628de99f3c417521b842.tar.bz2 |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 9249c70..6d111fa 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/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))); |