Skip to content

Commit 7ef9530

Browse files
[ADT] Simplify StringSet::contains (NFC) (llvm#157325)
We can use Base::contains.
1 parent 13647d8 commit 7ef9530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/StringSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class StringSet : public StringMap<std::nullopt_t, AllocatorTy> {
5757
}
5858

5959
/// Check if the set contains the given \c key.
60-
bool contains(StringRef key) const { return Base::FindKey(key) != -1; }
60+
bool contains(StringRef key) const { return Base::contains(key); }
6161
};
6262

6363
} // end namespace llvm

0 commit comments

Comments
 (0)