LLVM 22.0.0git
llvm::remarks::RemarkStreamer Class Referencefinal

#include "llvm/Remarks/RemarkStreamer.h"

Public Member Functions

 RemarkStreamer (std::unique_ptr< remarks::RemarkSerializer > RemarkSerializer, std::optional< StringRef > Filename=std::nullopt)
std::optional< StringRefgetFilename () const
 Return the filename that the remark diagnostics are emitted to.
raw_ostreamgetStream ()
 Return stream that the remark diagnostics are emitted to.
remarks::RemarkSerializergetSerializer ()
 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.

Detailed Description

Definition at line 44 of file RemarkStreamer.h.

Constructor & Destructor Documentation

◆ RemarkStreamer()

RemarkStreamer::RemarkStreamer ( std::unique_ptr< remarks::RemarkSerializer > RemarkSerializer,
std::optional< StringRef > Filename = std::nullopt )

Definition at line 27 of file RemarkStreamer.cpp.

References llvm::move().

Member Function Documentation

◆ getFilename()

std::optional< StringRef > llvm::remarks::RemarkStreamer::getFilename ( ) const
inline

Return the filename that the remark diagnostics are emitted to.

Definition at line 57 of file RemarkStreamer.h.

Referenced by llvm::AsmPrinter::emitRemarksSection().

◆ getSerializer()

remarks::RemarkSerializer & llvm::remarks::RemarkStreamer::getSerializer ( )
inline

Return the serializer used for this stream.

Definition at line 63 of file RemarkStreamer.h.

Referenced by llvm::AsmPrinter::emitRemarksSection().

◆ getStream()

raw_ostream & llvm::remarks::RemarkStreamer::getStream ( )
inline

Return stream that the remark diagnostics are emitted to.

Definition at line 61 of file RemarkStreamer.h.

◆ matchesFilter()

bool RemarkStreamer::matchesFilter ( StringRef Str)

Check wether the string matches the filter.

Definition at line 44 of file RemarkStreamer.cpp.

◆ needsSection()

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, and llvm::remarks::Separate.

Referenced by llvm::AsmPrinter::emitRemarksSection().

◆ setFilter()

Error RemarkStreamer::setFilter ( StringRef Filter)

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().


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