diff options
author | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-04-16 23:37:20 +0000 |
commit | 551754c4958086cc6910da7c950f2875e212f5cf (patch) | |
tree | 0287e856d7bde9ea8c3e629ffb889a78b778f634 /lib/VMCore/AsmWriter.cpp | |
parent | f2548caaa8b290aa598bf49c27dff72f7751ba5c (diff) |
Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index d732176841..6c1aa5ed10 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1847,7 +1847,6 @@ 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(); @@ -1871,10 +1870,10 @@ void AssemblyWriter::printInstruction(const Instruction &I) { writeOperand(Operand, true); } Out << '('; - for (unsigned op = 0, Eop = CI->getNumOperands() - 1; op < Eop; ++op) { - if (op > 0) + for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) { + if (op > 1) Out << ", "; - writeParamOperand(CI->getOperand(op), PAL.getParamAttributes(op + 1)); + writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op)); } Out << ')'; if (PAL.getFnAttributes() != Attribute::None) @@ -1918,10 +1917,10 @@ void AssemblyWriter::printInstruction(const Instruction &I) { writeOperand(Operand, true); } Out << '('; - for (unsigned op = 0, Eop = II->getNumOperands() - 3; op < Eop; ++op) { + for (unsigned op = 0, Eop = I.getNumOperands() - 3; op < Eop; ++op) { if (op) Out << ", "; - writeParamOperand(II->getOperand(op), PAL.getParamAttributes(op + 1)); + writeParamOperand(I.getOperand(op), PAL.getParamAttributes(op + 1)); } Out << ')'; |