From 45bed286fa534d77a270bc28ee69b5dc4a07fefd Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 31 Dec 2006 22:17:01 +0000 Subject: [PATCH] Fix a cut-and-paste bug for processing of InvokeInst parameter attributes. The lookup of parameter attributes was offset by two because of the additional operands in an invoke instruction. llvm-svn: 32801 --- lib/VMCore/AsmWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 317eb8e0aac..a46adabd1e1 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1237,8 +1237,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) { if (op > 3) Out << ','; writeOperand(I.getOperand(op), true); - if (FTy->getParamAttrs(op) != FunctionType::NoAttributeSet) - Out << " " << FTy->getParamAttrsText(FTy->getParamAttrs(op)); + if (FTy->getParamAttrs(op-2) != FunctionType::NoAttributeSet) + Out << " " << FTy->getParamAttrsText(FTy->getParamAttrs(op-2)); } Out << " )\n\t\t\tto";