diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /include/llvm/ADT/StringSet.h | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Diffstat (limited to 'include/llvm/ADT/StringSet.h')
-rw-r--r-- | include/llvm/ADT/StringSet.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/ADT/StringSet.h b/include/llvm/ADT/StringSet.h index 00048361e86f2..9c55f6b70e369 100644 --- a/include/llvm/ADT/StringSet.h +++ b/include/llvm/ADT/StringSet.h @@ -15,7 +15,6 @@ #define LLVM_ADT_STRINGSET_H #include "llvm/ADT/StringMap.h" -#include <cassert> namespace llvm { @@ -26,10 +25,10 @@ namespace llvm { class StringSet : public llvm::StringMap<char, AllocatorTy> { typedef llvm::StringMap<char, AllocatorTy> base; public: - bool insert(const std::string& InLang) { + bool insert(StringRef InLang) { assert(!InLang.empty()); - const char* KeyStart = &InLang[0]; - const char* KeyEnd = KeyStart + InLang.size(); + const char *KeyStart = InLang.data(); + const char *KeyEnd = KeyStart + InLang.size(); return base::insert(llvm::StringMapEntry<char>:: Create(KeyStart, KeyEnd, base::getAllocator(), '+')); } |