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:
Sanjay Patel 2016-01-13 22:16:48 +00:00
parent fa283c33ad
commit 04e5638e66

View File

@ -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;