summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/include/llvm/ADT/StringSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/include/llvm/ADT/StringSet.h')
-rw-r--r--contrib/llvm/include/llvm/ADT/StringSet.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/contrib/llvm/include/llvm/ADT/StringSet.h b/contrib/llvm/include/llvm/ADT/StringSet.h
index c32c2a4..9af44c0 100644
--- a/contrib/llvm/include/llvm/ADT/StringSet.h
+++ b/contrib/llvm/include/llvm/ADT/StringSet.h
@@ -1,4 +1,4 @@
-//===--- StringSet.h - The LLVM Compiler Driver -----------------*- C++ -*-===//
+//===- StringSet.h - The LLVM Compiler Driver -------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -15,13 +15,19 @@
#define LLVM_ADT_STRINGSET_H
#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Allocator.h"
+#include <cassert>
+#include <initializer_list>
+#include <utility>
namespace llvm {
/// StringSet - A wrapper for StringMap that provides set-like functionality.
- template <class AllocatorTy = llvm::MallocAllocator>
- class StringSet : public llvm::StringMap<char, AllocatorTy> {
- typedef llvm::StringMap<char, AllocatorTy> base;
+ template <class AllocatorTy = MallocAllocator>
+ class StringSet : public StringMap<char, AllocatorTy> {
+ using base = StringMap<char, AllocatorTy>;
+
public:
StringSet() = default;
StringSet(std::initializer_list<StringRef> S) {
@@ -40,6 +46,7 @@ namespace llvm {
base::insert(std::make_pair(*It, '\0'));
}
};
-}
+
+} // end namespace llvm
#endif // LLVM_ADT_STRINGSET_H
OpenPOWER on IntegriCloud