CIRCT
20.0.0git
|
PrettyPrinter::Listener that saves strings while live. More...
#include <PrettyPrinterHelpers.h>
Public Member Functions | |
TokenStringSaver () | |
StringRef | save (StringRef str) |
Add string, save in storage. More... | |
void | clear () override |
PrettyPrinter::Listener::clear – indicates no external refs. More... | |
Public Member Functions inherited from circt::pretty::PrettyPrinter::Listener | |
virtual | ~Listener () |
Destructor, anchor. More... | |
virtual void | print () |
Listener for print event. More... | |
Private Attributes | |
llvm::BumpPtrAllocator | alloc |
llvm::StringSaver | strings |
PrettyPrinter::Listener that saves strings while live.
Once they're no longer referenced, memory is reset. Allows differentiating between strings to save and external strings.
Definition at line 156 of file PrettyPrinterHelpers.h.
|
inline |
Definition at line 161 of file PrettyPrinterHelpers.h.
|
overridevirtual |
PrettyPrinter::Listener::clear – indicates no external refs.
Reimplemented from circt::pretty::PrettyPrinter::Listener.
Definition at line 26 of file PrettyPrinterHelpers.cpp.
References alloc.
|
inline |
Add string, save in storage.
Definition at line 164 of file PrettyPrinterHelpers.h.
References strings.
Referenced by circt::pretty::TokenStream< PPTy >::operator<<().
|
private |
Definition at line 157 of file PrettyPrinterHelpers.h.
Referenced by clear().
|
private |
Definition at line 158 of file PrettyPrinterHelpers.h.
Referenced by save().