[llvm] [Transforms][NFC] Tiny fixes in SplitModule (PR #95903)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 02:36:31 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())
----------------
fhahn wrote:

Right I guess sits down to personal preference.

https://github.com/llvm/llvm-project/pull/95903


More information about the llvm-commits mailing list