[llvm] [Support] Use StringMap::contains (NFC) (PR #168673)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 22:39:13 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/168673
Identified with readability-container-contains.
>From 13a0a9e31077748735f142d933c95fb008fcb406 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 17 Nov 2025 23:30:09 -0800
Subject: [PATCH] [Support] Use StringMap::contains (NFC)
Identified with readability-container-contains.
---
llvm/lib/Support/SpecialCaseList.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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