[flang-commits] [flang] d61f560 - [flang] Use Use *{Set, Map}::contains (NFC)

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Tue Mar 14 22:20:49 PDT 2023


Author: Kazu Hirata
Date: 2023-03-14T22:20:33-07:00
New Revision: d61f560919f49ee1af13033f8070a0028d5863a0

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

LOG: [flang] Use Use *{Set,Map}::contains (NFC)

Added: 
    

Modified: 
    flang/lib/Lower/PFTBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/PFTBuilder.cpp b/flang/lib/Lower/PFTBuilder.cpp
index 98f02620bedde..6261a9093cbc3 100644
--- a/flang/lib/Lower/PFTBuilder.cpp
+++ b/flang/lib/Lower/PFTBuilder.cpp
@@ -1394,7 +1394,7 @@ struct SymbolDependenceAnalysis {
   void analyzeLocalEquivalenceSets(const semantics::Scope &scope) {
     if (scope.equivalenceSets().empty())
       return; // no equivalence sets to analyze
-    if (analyzedScopes.find(&scope) != analyzedScopes.end())
+    if (analyzedScopes.contains(&scope))
       return; // equivalence sets already analyzed
 
     analyzedScopes.insert(&scope);
@@ -1542,7 +1542,7 @@ struct SymbolDependenceAnalysis {
     const semantics::Scope &scope = ultimate.owner();
     // Expect the total number of EQUIVALENCE sets to be small for a typical
     // Fortran program.
-    if (aliasSyms.find(&ultimate) != aliasSyms.end()) {
+    if (aliasSyms.contains(&ultimate)) {
       LLVM_DEBUG(llvm::dbgs() << "found aggregate containing " << &ultimate
                               << " " << ultimate.name() << " in <" << &scope
                               << "> " << scope.GetName() << '\n');


        


More information about the flang-commits mailing list