forked from OSchip/llvm-project
hasNUses(0) == use_empty() ; NFCI
Also, improve variable name and remove unnecessary braces. llvm-svn: 257687
This commit is contained in:
parent
2d2f2b5c80
commit
42c73555b0
|
@ -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