LLVM  12.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, Optional< StringRef > Filename=None)
 
Optional< StringRefgetFilename () const
 Return the filename that the remark diagnostics are emitted to. More...
 
raw_ostreamgetStream ()
 Return stream that the remark diagnostics are emitted to. More...
 
remarks::RemarkSerializergetSerializer ()
 Return the serializer used for this stream. More...
 
Error setFilter (StringRef Filter)
 Set a pass filter based on a regex Filter. More...
 
bool matchesFilter (StringRef Str)
 Check wether the string matches the filter. More...
 
bool needsSection () const
 Check if the remarks also need to have associated metadata in a section. More...
 

Detailed Description

Definition at line 42 of file RemarkStreamer.h.

Constructor & Destructor Documentation

◆ RemarkStreamer()

RemarkStreamer::RemarkStreamer ( std::unique_ptr< remarks::RemarkSerializer RemarkSerializer,
Optional< StringRef Filename = None 
)

Definition at line 26 of file RemarkStreamer.cpp.

References llvm::None, and string.

Member Function Documentation

◆ getFilename()

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

Return the filename that the remark diagnostics are emitted to.

Definition at line 55 of file RemarkStreamer.h.

References llvm::None.

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

◆ getSerializer()

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

Return the serializer used for this stream.

Definition at line 61 of file RemarkStreamer.h.

References llvm::Filter, matchesFilter(), needsSection(), and setFilter().

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 59 of file RemarkStreamer.h.

◆ matchesFilter()

bool RemarkStreamer::matchesFilter ( StringRef  Str)

Check wether the string matches the filter.

Definition at line 42 of file RemarkStreamer.cpp.

Referenced by llvm::LLVMRemarkStreamer::emit(), and getSerializer().

◆ 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 32 of file RemarkStreamer.cpp.

References llvm::createStringError(), llvm::Regex::isValid(), llvm::make_error_code(), and llvm::Error::success().

Referenced by getSerializer(), and llvm::setupLLVMOptimizationRemarks().


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