LLVM 20.0.0git
Public Member Functions | List of all members
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 string.

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::LLVMRemarkStreamer::emit(), and 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.

References llvm::remarks::RemarkSerializer::OS.

◆ matchesFilter()

bool RemarkStreamer::matchesFilter ( StringRef  Str)

Check wether the string matches the filter.

Definition at line 44 of file RemarkStreamer.cpp.

Referenced by llvm::LLVMRemarkStreamer::emit().

◆ needsSection()

bool RemarkStreamer::needsSection ( ) const

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

Referenced by llvm::setupLLVMOptimizationRemarks().


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