From 7a743e15e31701db08f2092538ed2d5dfabe0cdb Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Mon, 22 Mar 2010 08:28:00 +0000 Subject: Now that hopefully all direct accesses to InvokeInst operands are fixed we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170 --- 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 3ab2726..1f69e16 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1090,11 +1090,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.1