[llvm] Migrate from getNumArgOperands to arg_size (NFC)

Note that getNumArgOperands is considered a legacy name.  See
llvm/include/llvm/IR/InstrTypes.h for details.
This commit is contained in:
Kazu Hirata
2021-10-05 08:29:19 -07:00
parent de5b16d8ca
commit 3081de8c72
3 changed files with 38 additions and 41 deletions

View File

@@ -2917,8 +2917,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
for (unsigned i = FTy->getNumParams(), e = II->getNumArgOperands();
i != e; ++i)
for (unsigned i = FTy->getNumParams(), e = II->arg_size(); i != e; ++i)
pushValueAndType(I.getOperand(i), InstID, Vals); // vararg
}
break;
@@ -2999,8 +2998,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
for (unsigned i = FTy->getNumParams(), e = CBI->getNumArgOperands();
i != e; ++i)
for (unsigned i = FTy->getNumParams(), e = CBI->arg_size(); i != e; ++i)
pushValueAndType(I.getOperand(i), InstID, Vals); // vararg
}
break;
@@ -3164,8 +3162,7 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
// Emit type/value pairs for varargs params.
if (FTy->isVarArg()) {
for (unsigned i = FTy->getNumParams(), e = CI.getNumArgOperands();
i != e; ++i)
for (unsigned i = FTy->getNumParams(), e = CI.arg_size(); i != e; ++i)
pushValueAndType(CI.getArgOperand(i), InstID, Vals); // varargs
}
break;