[llvm] be1cca1 - [NFC] use Range based any_of for more concise code.

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 10:44:46 PST 2022


Author: Florian Mayer
Date: 2022-02-07T10:44:29-08:00
New Revision: be1cca1b0d7ce01dff2a3cf97438f437576a1fa0

URL: https://github.com/llvm/llvm-project/commit/be1cca1b0d7ce01dff2a3cf97438f437576a1fa0
DIFF: https://github.com/llvm/llvm-project/commit/be1cca1b0d7ce01dff2a3cf97438f437576a1fa0.diff

LOG: [NFC] use Range based any_of for more concise code.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
index 41e3c13c4fee5..3bb4a8297be6a 100644
--- a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
+++ b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
@@ -47,8 +47,7 @@ bool forAllReachableExits(const DominatorTree &DT, const PostDominatorTree &PDT,
     // TODO(fmayer): We don't support diamond shapes, where multiple lifetime
     // ends together dominate the RI, but none of them does by itself.
     // Check how often this happens and decide whether to support this here.
-    if (std::any_of(Ends.begin(), Ends.end(),
-                    [&](Instruction *End) { return DT.dominates(End, RI); }))
+    if (llvm::any_of(Ends, [&](auto *End) { return DT.dominates(End, RI); }))
       ++NumCoveredExits;
   }
   // If there's a mix of covered and non-covered exits, just put the untag


        


More information about the llvm-commits mailing list