diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-06-28 00:25:40 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-06-28 00:25:40 +0000 |
commit | 1bde770ccd35b27e0421e54fcdde1f33cdba0f7a (patch) | |
tree | 864617a53d26d16f9bf087e76f1eccc8a41d415b /lib/Transforms/InstCombine | |
parent | ab7bcc60bc2b5592c9a3d82c16e84d67c4c95e25 (diff) | |
download | external_llvm-1bde770ccd35b27e0421e54fcdde1f33cdba0f7a.zip external_llvm-1bde770ccd35b27e0421e54fcdde1f33cdba0f7a.tar.gz external_llvm-1bde770ccd35b27e0421e54fcdde1f33cdba0f7a.tar.bz2 |
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
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 78b4a2c..815db33 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -946,7 +946,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) { int ix = FTy->getNumParams(); // See if we can optimize any arguments passed through the varargs area of // 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) { CastInst *CI = dyn_cast<CastInst>(*I); if (CI && isSafeToEliminateVarargsCast(CS, CI, TD, ix)) { @@ -1036,7 +1036,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { return false; } - unsigned NumActualArgs = unsigned(CS.arg_end()-CS.arg_begin()); + unsigned NumActualArgs = CS.arg_size(); unsigned NumCommonArgs = std::min(FT->getNumParams(), NumActualArgs); CallSite::arg_iterator AI = CS.arg_begin(); @@ -1287,7 +1287,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, if (NestTy) { Instruction *Caller = CS.getInstruction(); std::vector<Value*> NewArgs; - NewArgs.reserve(unsigned(CS.arg_end()-CS.arg_begin())+1); + NewArgs.reserve(CS.arg_size() + 1); SmallVector<AttributeSet, 8> NewAttrs; NewAttrs.reserve(Attrs.getNumSlots() + 1); |