LLVM 22.0.0git
|
#include "llvm/Remarks/RemarkStreamer.h"
Public Member Functions | |
RemarkStreamer (std::unique_ptr< remarks::RemarkSerializer > RemarkSerializer, std::optional< StringRef > Filename=std::nullopt) | |
~RemarkStreamer () | |
std::optional< StringRef > | getFilename () const |
Return the filename that the remark diagnostics are emitted to. | |
raw_ostream & | getStream () |
Return stream that the remark diagnostics are emitted to. | |
remarks::RemarkSerializer & | getSerializer () |
Return the serializer used for this stream. | |
std::unique_ptr< remarks::RemarkSerializer > | releaseSerializer () |
Release the underlying RemarkSerializer. | |
Error | setFilter (StringRef Filter) |
Set a pass filter based on a regex Filter . | |
bool | matchesFilter (StringRef Str) |
Check wether the string matches the filter. | |
bool | needsSection () const |
Check if the remarks also need to have associated metadata in a section. |
Definition at line 44 of file RemarkStreamer.h.
RemarkStreamer::RemarkStreamer | ( | std::unique_ptr< remarks::RemarkSerializer > | RemarkSerializer, |
std::optional< StringRef > | Filename = std::nullopt ) |
Definition at line 28 of file RemarkStreamer.cpp.
References llvm::move().
RemarkStreamer::~RemarkStreamer | ( | ) |
Definition at line 35 of file RemarkStreamer.cpp.
References assert().
|
inline |
Return the filename that the remark diagnostics are emitted to.
Definition at line 58 of file RemarkStreamer.h.
Referenced by llvm::AsmPrinter::emitRemarksSection().
|
inline |
Return the serializer used for this stream.
Definition at line 64 of file RemarkStreamer.h.
Referenced by llvm::AsmPrinter::emitRemarksSection().
|
inline |
Return stream that the remark diagnostics are emitted to.
Definition at line 62 of file RemarkStreamer.h.
Check wether the string matches the filter.
Definition at line 53 of file RemarkStreamer.cpp.
bool RemarkStreamer::needsSection | ( | ) | const |
Check if the remarks also need to have associated metadata in a section.
Definition at line 60 of file RemarkStreamer.cpp.
References assert(), llvm::remarks::Bitstream, llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, and EnableRemarksSection.
Referenced by llvm::AsmPrinter::emitRemarksSection().
|
inline |
Release the underlying RemarkSerializer.
Destructing the RemarkStreamer will assert that the RemarkStreamer has been released, to ensure that the remarks were properly finalized.
Definition at line 69 of file RemarkStreamer.h.
Set a pass filter based on a regex Filter
.
Returns an error if the regex is invalid.
Definition at line 43 of file RemarkStreamer.cpp.
References llvm::createStringError(), llvm::Filter, and llvm::Error::success().