From: Craig Topper Date: Sun, 29 Nov 2015 04:37:14 +0000 (+0000) Subject: Remove unnecessary intermediate lambda. NFC X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=b013b28ec87299c64b5a1888dfea7c3883682775;ds=inline Remove unnecessary intermediate lambda. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GlobalsModRef.cpp b/lib/Analysis/GlobalsModRef.cpp index c809ff83457..86c2e501465 100644 --- a/lib/Analysis/GlobalsModRef.cpp +++ b/lib/Analysis/GlobalsModRef.cpp @@ -878,9 +878,7 @@ ModRefInfo GlobalsAAResult::getModRefInfoForArgument(ImmutableCallSite CS, GetUnderlyingObjects(A, Objects, DL); // All objects must be identified. - if (!std::all_of(Objects.begin(), Objects.end(), [&GV](const Value *V) { - return isIdentifiedObject(V); - })) + if (!std::all_of(Objects.begin(), Objects.end(), isIdentifiedObject)) return ConservativeResult; if (std::find(Objects.begin(), Objects.end(), GV) != Objects.end()) diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 5ed7f8748c9..0bd18c1a35c 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -2090,8 +2090,7 @@ static Constant *computePointerICmp(const DataLayout &DL, // Is the set of underlying objects all noalias calls? auto IsNAC = [](SmallVectorImpl &Objects) { - return std::all_of(Objects.begin(), Objects.end(), - [](Value *V){ return isNoAliasCall(V); }); + return std::all_of(Objects.begin(), Objects.end(), isNoAliasCall); }; // Is the set of underlying objects all things which must be disjoint from