summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringSet.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-17 20:22:39 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-17 20:22:39 +0000
commit7af96fb3afd6725a2824a0a5ca5dad34e5e0b056 (patch)
tree6661ffbabf869009597684462f5a3df3beccc952 /include/llvm/ADT/StringSet.h
parent6b3f41ed88e8e440e11a4fbf20b6600529f80049 (diff)
Notes
Diffstat (limited to 'include/llvm/ADT/StringSet.h')
-rw-r--r--include/llvm/ADT/StringSet.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/llvm/ADT/StringSet.h b/include/llvm/ADT/StringSet.h
index c32c2a4974385..9af44c07df795 100644
--- a/include/llvm/ADT/StringSet.h
+++ b/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