mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 07:17:32 +00:00
Fix using arg_end() - arg_begin() instead of arg_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185121 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -946,7 +946,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
|
|||||||
int ix = FTy->getNumParams();
|
int ix = FTy->getNumParams();
|
||||||
// See if we can optimize any arguments passed through the varargs area of
|
// See if we can optimize any arguments passed through the varargs area of
|
||||||
// the call.
|
// the call.
|
||||||
for (CallSite::arg_iterator I = CS.arg_begin()+FTy->getNumParams(),
|
for (CallSite::arg_iterator I = CS.arg_begin() + FTy->getNumParams(),
|
||||||
E = CS.arg_end(); I != E; ++I, ++ix) {
|
E = CS.arg_end(); I != E; ++I, ++ix) {
|
||||||
CastInst *CI = dyn_cast<CastInst>(*I);
|
CastInst *CI = dyn_cast<CastInst>(*I);
|
||||||
if (CI && isSafeToEliminateVarargsCast(CS, CI, TD, ix)) {
|
if (CI && isSafeToEliminateVarargsCast(CS, CI, TD, ix)) {
|
||||||
@@ -1036,7 +1036,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned NumActualArgs = unsigned(CS.arg_end()-CS.arg_begin());
|
unsigned NumActualArgs = CS.arg_size();
|
||||||
unsigned NumCommonArgs = std::min(FT->getNumParams(), NumActualArgs);
|
unsigned NumCommonArgs = std::min(FT->getNumParams(), NumActualArgs);
|
||||||
|
|
||||||
CallSite::arg_iterator AI = CS.arg_begin();
|
CallSite::arg_iterator AI = CS.arg_begin();
|
||||||
@@ -1287,7 +1287,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS,
|
|||||||
if (NestTy) {
|
if (NestTy) {
|
||||||
Instruction *Caller = CS.getInstruction();
|
Instruction *Caller = CS.getInstruction();
|
||||||
std::vector<Value*> NewArgs;
|
std::vector<Value*> NewArgs;
|
||||||
NewArgs.reserve(unsigned(CS.arg_end()-CS.arg_begin())+1);
|
NewArgs.reserve(CS.arg_size() + 1);
|
||||||
|
|
||||||
SmallVector<AttributeSet, 8> NewAttrs;
|
SmallVector<AttributeSet, 8> NewAttrs;
|
||||||
NewAttrs.reserve(Attrs.getNumSlots() + 1);
|
NewAttrs.reserve(Attrs.getNumSlots() + 1);
|
||||||
|
Reference in New Issue
Block a user