mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Replace explicit loop with utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1638,10 +1638,8 @@ static bool AddressIsTaken(GlobalValue *GV) {
|
|||||||
} else if (isa<InvokeInst>(*UI) || isa<CallInst>(*UI)) {
|
} else if (isa<InvokeInst>(*UI) || isa<CallInst>(*UI)) {
|
||||||
// Make sure we are calling the function, not passing the address.
|
// Make sure we are calling the function, not passing the address.
|
||||||
CallSite CS = CallSite::get(cast<Instruction>(*UI));
|
CallSite CS = CallSite::get(cast<Instruction>(*UI));
|
||||||
for (CallSite::arg_iterator AI = CS.arg_begin(),
|
if (CS.hasArgument(GV))
|
||||||
E = CS.arg_end(); AI != E; ++AI)
|
return true;
|
||||||
if (*AI == GV)
|
|
||||||
return true;
|
|
||||||
} else if (LoadInst *LI = dyn_cast<LoadInst>(*UI)) {
|
} else if (LoadInst *LI = dyn_cast<LoadInst>(*UI)) {
|
||||||
if (LI->isVolatile())
|
if (LI->isVolatile())
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user