mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
hasNUses(0) == use_empty() ; NFCI
Also, improve variable name and remove unnecessary braces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa283c33ad
commit
04e5638e66
@ -506,10 +506,9 @@ static void AddAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap,
|
||||
const Function *CalledFunc = CS.getCalledFunction();
|
||||
SmallVector<const Argument *, 4> NoAliasArgs;
|
||||
|
||||
for (const Argument &I : CalledFunc->args()) {
|
||||
if (I.hasNoAliasAttr() && !I.hasNUses(0))
|
||||
NoAliasArgs.push_back(&I);
|
||||
}
|
||||
for (const Argument &Arg : CalledFunc->args())
|
||||
if (Arg.hasNoAliasAttr() && !Arg.use_empty())
|
||||
NoAliasArgs.push_back(&Arg);
|
||||
|
||||
if (NoAliasArgs.empty())
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user