[llvm-commits] [llvm] r106623 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Gabor Greif
ggreif at gmail.com
Wed Jun 23 06:09:06 PDT 2010
Author: ggreif
Date: Wed Jun 23 08:09:06 2010
New Revision: 106623
URL: http://llvm.org/viewvc/llvm-project?rev=106623&view=rev
Log:
use ArgOperand accessors
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=106623&r1=106622&r2=106623&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Wed Jun 23 08:09:06 2010
@@ -1854,6 +1854,7 @@
default: Out << " cc" << CI->getCallingConv(); break;
}
+ Operand = CI->getCalledValue();
const PointerType *PTy = cast<PointerType>(Operand->getType());
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
const Type *RetTy = FTy->getReturnType();
@@ -1877,10 +1878,10 @@
writeOperand(Operand, true);
}
Out << '(';
- for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) {
- if (op > 1)
+ for (unsigned op = 0, Eop = CI->getNumArgOperands(); op < Eop; ++op) {
+ if (op > 0)
Out << ", ";
- writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op));
+ writeParamOperand(CI->getArgOperand(op), PAL.getParamAttributes(op + 1));
}
Out << ')';
if (PAL.getFnAttributes() != Attribute::None)
@@ -1925,10 +1926,10 @@
writeOperand(Operand, true);
}
Out << '(';
- for (unsigned op = 0, Eop = I.getNumOperands() - 3; op < Eop; ++op) {
+ for (unsigned op = 0, Eop = II->getNumArgOperands(); op < Eop; ++op) {
if (op)
Out << ", ";
- writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op + 1));
+ writeParamOperand(II->getArgOperand(op), PAL.getParamAttributes(op + 1));
}
Out << ')';
More information about the llvm-commits
mailing list