From 14dfba6d6691218a791942429f5b3d19ca8f6980 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 3 Sep 2009 00:18:58 +0000 Subject: re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed... llvm-svn: 80858 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 9cb57585762..3ea96317485 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -960,11 +960,11 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, // Emit value #'s for the fixed parameters. for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) - Vals.push_back(VE.getValueID(I.getOperand(i+3))); // fixed param. + Vals.push_back(VE.getValueID(I.getOperand(i))); // fixed param. // Emit type/value pairs for varargs params. if (FTy->isVarArg()) { - for (unsigned i = 3+FTy->getNumParams(), e = I.getNumOperands(); + for (unsigned i = FTy->getNumParams(), e = I.getNumOperands()-3; i != e; ++i) PushValueAndType(I.getOperand(i), InstID, Vals, VE); // vararg } -- cgit v1.2.3