aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-06-23 13:09:06 +0000
committerGabor Greif <ggreif@gmail.com>2010-06-23 13:09:06 +0000
commit7bbdf0c8489794721f23ee6b00af021c24f007d7 (patch)
tree53135df26380ea83ee50425336fc2574f08f3946 /lib/VMCore/AsmWriter.cpp
parentbb6eabf4f5b518a333ab4cedce910962ff935e3a (diff)
downloadexternal_llvm-7bbdf0c8489794721f23ee6b00af021c24f007d7.zip
external_llvm-7bbdf0c8489794721f23ee6b00af021c24f007d7.tar.gz
external_llvm-7bbdf0c8489794721f23ee6b00af021c24f007d7.tar.bz2
use ArgOperand accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106623 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index e48c026..057ad91 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1854,6 +1854,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
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 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
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 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
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 << ')';