LLVM 20.0.0git
|
#include "llvm/Remarks/RemarkStreamer.h"
Public Member Functions | |
RemarkStreamer (std::unique_ptr< remarks::RemarkSerializer > RemarkSerializer, std::optional< StringRef > Filename=std::nullopt) | |
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. | |
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 27 of file RemarkStreamer.cpp.
References string.
|
inline |
Return the filename that the remark diagnostics are emitted to.
Definition at line 57 of file RemarkStreamer.h.
Referenced by llvm::AsmPrinter::emitRemarksSection().
|
inline |
Return the serializer used for this stream.
Definition at line 63 of file RemarkStreamer.h.
Referenced by llvm::LLVMRemarkStreamer::emit(), and llvm::AsmPrinter::emitRemarksSection().
|
inline |
Return stream that the remark diagnostics are emitted to.
Definition at line 61 of file RemarkStreamer.h.
References llvm::remarks::RemarkSerializer::OS.
Check wether the string matches the filter.
Definition at line 44 of file RemarkStreamer.cpp.
Referenced by llvm::LLVMRemarkStreamer::emit().
bool RemarkStreamer::needsSection | ( | ) | const |
Check if the remarks also need to have associated metadata in a section.
Definition at line 51 of file RemarkStreamer.cpp.
References assert(), llvm::remarks::Bitstream, llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, EnableRemarksSection, llvm::remarks::RemarkSerializer::Mode, llvm::remarks::Separate, llvm::remarks::RemarkSerializer::SerializerFormat, and llvm::remarks::YAMLStrTab.
Referenced by llvm::AsmPrinter::emitRemarksSection().
Set a pass filter based on a regex Filter
.
Returns an error if the regex is invalid.
Definition at line 34 of file RemarkStreamer.cpp.
References llvm::createStringError(), llvm::Filter, and llvm::Error::success().
Referenced by llvm::setupLLVMOptimizationRemarks().