[llvm] [Transforms][NFC] Tiny fixes in SplitModule (PR #95903)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 02:31:05 PDT 2024
================
@@ -275,8 +278,8 @@ void llvm::SplitModule(
ValueToValueMapTy VMap;
std::unique_ptr<Module> MPart(
CloneModule(M, VMap, [&](const GlobalValue *GV) {
- if (ClusterIDMap.count(GV))
- return (ClusterIDMap[GV] == I);
+ if (auto It = ClusterIDMap.find(GV); It != ClusterIDMap.end())
----------------
Pierre-vh wrote:
I also use this pattern a lot and I think it's more readable than 2 separate line
https://github.com/llvm/llvm-project/pull/95903
More information about the llvm-commits
mailing list