mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-25 03:30:37 +00:00
modernize stringset interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26a9142bd6
commit
d69121b3c5
@ -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(), '+'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user