From d39c594d39df7f283c2fb8a704a3f31c501180d9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Sep 2010 15:48:55 +0000 Subject: Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) --- include/llvm/ADT/StringSet.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/llvm/ADT/StringSet.h') 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 namespace llvm { @@ -26,10 +25,10 @@ namespace llvm { class StringSet : public llvm::StringMap { typedef llvm::StringMap 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:: Create(KeyStart, KeyEnd, base::getAllocator(), '+')); } -- cgit v1.2.3