LLVM  9.0.0svn
Public Member Functions | List of all members
llvm::RemarkStreamer Class Reference

Streamer for remarks. More...

#include "llvm/IR/RemarkStreamer.h"

Public Member Functions

 RemarkStreamer (StringRef Filename, std::unique_ptr< remarks::Serializer > Serializer)
 
StringRef getFilename () 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::SerializergetSerializer ()
 Return the serializer used for this stream. More...
 
Error setFilter (StringRef Filter)
 Set a pass filter based on a regex Filter. More...
 
void emit (const DiagnosticInfoOptimizationBase &Diag)
 Emit a diagnostic through the streamer. More...
 

Detailed Description

Streamer for remarks.

Definition at line 27 of file RemarkStreamer.h.

Constructor & Destructor Documentation

◆ RemarkStreamer()

RemarkStreamer::RemarkStreamer ( StringRef  Filename,
std::unique_ptr< remarks::Serializer Serializer 
)

Definition at line 21 of file RemarkStreamer.cpp.

References assert(), and llvm::StringRef::empty().

Member Function Documentation

◆ emit()

void RemarkStreamer::emit ( const DiagnosticInfoOptimizationBase Diag)

◆ getFilename()

StringRef llvm::RemarkStreamer::getFilename ( ) const
inline

Return the filename that the remark diagnostics are emitted to.

Definition at line 50 of file RemarkStreamer.h.

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

◆ getSerializer()

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

Return the serializer used for this stream.

Definition at line 54 of file RemarkStreamer.h.

References emit(), llvm::Filter, and setFilter().

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

◆ getStream()

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

Return stream that the remark diagnostics are emitted to.

Definition at line 52 of file RemarkStreamer.h.

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

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

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


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