aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h b/contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h
index 63d929399a4e..c4245175544b 100644
--- a/contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h
+++ b/contrib/llvm-project/llvm/include/llvm/ADT/StringSet.h
@@ -45,6 +45,9 @@ public:
insert(const StringMapEntry<ValueTy> &mapEntry) {
return insert(mapEntry.getKey());
}
+
+ /// Check if the set contains the given \c key.
+ bool contains(StringRef key) const { return Base::FindKey(key) != -1; }
};
} // end namespace llvm