From: Nick Lewycky Date: Mon, 3 Nov 2008 03:49:14 +0000 (+0000) Subject: Replace explicit loop with utility function. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=af38613e319fa9a8868578e94a48ec6349788266;p=oota-llvm.git Replace explicit loop with utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58593 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 48842b2e385..01b192630d3 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -1638,10 +1638,8 @@ static bool AddressIsTaken(GlobalValue *GV) { } else if (isa(*UI) || isa(*UI)) { // Make sure we are calling the function, not passing the address. CallSite CS = CallSite::get(cast(*UI)); - for (CallSite::arg_iterator AI = CS.arg_begin(), - E = CS.arg_end(); AI != E; ++AI) - if (*AI == GV) - return true; + if (CS.hasArgument(GV)) + return true; } else if (LoadInst *LI = dyn_cast(*UI)) { if (LI->isVolatile()) return true;