|
LLDB mainline
|
Turns strings into unique Identifier objects. More...
#include <Identifier.h>
Public Member Functions | |
| ~IdentifierMap () | |
| Identifier | get (llvm::StringRef name) |
Returns an Identifier for name. | |
| Identifier | getWithStaticStorageStr (llvm::StringRef name) |
Returns an Identifier for name. | |
Private Attributes | |
| llvm::BumpPtrAllocator | m_string_storage |
| Owns the copies made by get(). | |
| llvm::DenseSet< llvm::StringRef > | m_names |
| Set of all created Identifiers strings. | |
Turns strings into unique Identifier objects.
Definition at line 39 of file Identifier.h.
| IdentifierMap::~IdentifierMap | ( | ) |
Definition at line 39 of file Identifier.cpp.
References m_names.
| Identifier IdentifierMap::get | ( | llvm::StringRef | name | ) |
Returns an Identifier for name.
This copies the string into storage owned by this map.
Definition at line 19 of file Identifier.cpp.
References m_names, and m_string_storage.
| Identifier IdentifierMap::getWithStaticStorageStr | ( | llvm::StringRef | name | ) |
Returns an Identifier for name.
This does not make a copy of the passed string and the string storage needs to outlive this IdentifierMap. This is used if name is a string literal or backed by ConstString.
Definition at line 33 of file Identifier.cpp.
References m_names.
|
private |
Set of all created Identifiers strings.
Definition at line 59 of file Identifier.h.
Referenced by get(), getWithStaticStorageStr(), and ~IdentifierMap().
|
private |