[llvm] c2445d9 - [Support] Use StringMap::contains (NFC) (#168673)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 08:48:45 PST 2025


Author: Kazu Hirata
Date: 2025-11-19T08:48:41-08:00
New Revision: c2445d9c26c10eebfd6df603f2a9a0aa774e8d84

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

LOG: [Support] Use StringMap::contains (NFC) (#168673)

Identified with readability-container-contains.

Added: 
    

Modified: 
    llvm/lib/Support/SpecialCaseList.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index 9f069bebcec73..7495308675c1d 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -455,7 +455,7 @@ unsigned SpecialCaseList::Section::getLastMatch(StringRef Prefix,
 }
 
 bool SpecialCaseList::Section::hasPrefix(StringRef Prefix) const {
-  return Impl->Entries.find(Prefix) != Impl->Entries.end();
+  return Impl->Entries.contains(Prefix);
 }
 
 } // namespace llvm


        


More information about the llvm-commits mailing list