1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

Replace explicit loop with utility function.

llvm-svn: 58593
This commit is contained in:
Nick Lewycky 2008-11-03 03:49:14 +00:00
parent cc1b7622a5
commit f393d56364

View File

@ -1638,10 +1638,8 @@ static bool AddressIsTaken(GlobalValue *GV) {
} else if (isa<InvokeInst>(*UI) || isa<CallInst>(*UI)) {
// Make sure we are calling the function, not passing the address.
CallSite CS = CallSite::get(cast<Instruction>(*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<LoadInst>(*UI)) {
if (LI->isVolatile())
return true;