|
LLVM
10.0.0
|
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer. More...
#include "llvm/Support/StringSaver.h"
Public Member Functions | |
| UniqueStringSaver (BumpPtrAllocator &Alloc) | |
| StringRef | save (const char *S) |
| StringRef | save (StringRef S) |
| StringRef | save (const Twine &S) |
| StringRef | save (const std::string &S) |
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.
Saving the same string yields the same StringRef.
Compared to StringSaver, it does more work but avoids saving the same string multiple times.
Compared to StringPool, it performs fewer allocations but doesn't support refcounting/deletion.
Definition at line 42 of file StringSaver.h.
|
inline |
Definition at line 47 of file StringSaver.h.
Definition at line 50 of file StringSaver.h.
References llvm::StringSaver::save(), and save().
Referenced by save(), llvm::GlobalValue::setPartition(), and llvm::GlobalObject::setSection().
Definition at line 21 of file StringSaver.cpp.
Definition at line 52 of file StringSaver.h.
References save(), and llvm::Twine::str().
Referenced by save().
1.8.13