OSDN Git Service

Remove unnecessary intermediate lambda. NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 29 Nov 2015 04:37:14 +0000 (04:37 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 29 Nov 2015 04:37:14 +0000 (04:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GlobalsModRef.cpp
lib/Analysis/InstructionSimplify.cpp

index c809ff8..86c2e50 100644 (file)
@@ -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())
index 5ed7f87..0bd18c1 100644 (file)
@@ -2090,8 +2090,7 @@ static Constant *computePointerICmp(const DataLayout &DL,
 
     // Is the set of underlying objects all noalias calls?
     auto IsNAC = [](SmallVectorImpl<Value *> &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