LLVM 20.0.0git
Public Member Functions | List of all members
llvm::StringSaver Class Referencefinal

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

 StringSaver (BumpPtrAllocator &Alloc)
 
BumpPtrAllocatorgetAllocator () const
 
StringRef save (const char *S)
 
StringRef save (StringRef S)
 
StringRef save (const Twine &S)
 
StringRef save (const std::string &S)
 

Detailed Description

Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.

Definition at line 21 of file StringSaver.h.

Constructor & Destructor Documentation

◆ StringSaver()

llvm::StringSaver::StringSaver ( BumpPtrAllocator Alloc)
inline

Definition at line 25 of file StringSaver.h.

Member Function Documentation

◆ getAllocator()

BumpPtrAllocator & llvm::StringSaver::getAllocator ( ) const
inline

Definition at line 27 of file StringSaver.h.

Referenced by llvm::cl::expandResponseFiles(), and llvm::cl::ExpandResponseFiles().

◆ save() [1/4]

StringRef llvm::StringSaver::save ( const char S)
inline

◆ save() [2/4]

StringRef llvm::StringSaver::save ( const std::string &  S)
inline

Definition at line 33 of file StringSaver.h.

References save().

Referenced by save().

◆ save() [3/4]

StringRef StringSaver::save ( const Twine S)

Definition at line 23 of file StringSaver.cpp.

References save(), and llvm::Twine::toStringRef().

◆ save() [4/4]

StringRef StringSaver::save ( StringRef  S)

The documentation for this class was generated from the following files: