MLIR  14.0.0git
Public Member Functions | List of all members
mlir::InFlightDiagnostic Class Reference

This class represents a diagnostic that is inflight and set to be reported. More...

#include "mlir/IR/Diagnostics.h"

Public Member Functions

 InFlightDiagnostic ()=default
 
 InFlightDiagnostic (InFlightDiagnostic &&rhs)
 
 ~InFlightDiagnostic ()
 
template<typename Arg >
InFlightDiagnosticoperator<< (Arg &&arg) &
 Stream operator for new diagnostic arguments. More...
 
template<typename Arg >
InFlightDiagnostic && operator<< (Arg &&arg) &&
 
template<typename... Args>
InFlightDiagnosticappend (Args &&... args) &
 Append arguments to the diagnostic. More...
 
template<typename... Args>
InFlightDiagnostic && append (Args &&... args) &&
 
DiagnosticattachNote (Optional< Location > noteLoc=llvm::None)
 Attaches a note to this diagnostic. More...
 
void report ()
 Reports the diagnostic to the engine. More...
 
void abandon ()
 Abandons this diagnostic so that it will no longer be reported. More...
 
 operator LogicalResult () const
 Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic. More...
 

Detailed Description

This class represents a diagnostic that is inflight and set to be reported.

This allows for last minute modifications of the diagnostic before it is emitted by a DiagnosticEngine.

Definition at line 301 of file Diagnostics.h.

Constructor & Destructor Documentation

◆ InFlightDiagnostic() [1/2]

mlir::InFlightDiagnostic::InFlightDiagnostic ( )
default

◆ InFlightDiagnostic() [2/2]

mlir::InFlightDiagnostic::InFlightDiagnostic ( InFlightDiagnostic &&  rhs)
inline

Definition at line 304 of file Diagnostics.h.

◆ ~InFlightDiagnostic()

mlir::InFlightDiagnostic::~InFlightDiagnostic ( )
inline

Definition at line 310 of file Diagnostics.h.

Member Function Documentation

◆ abandon()

void InFlightDiagnostic::abandon ( )

Abandons this diagnostic so that it will no longer be reported.

Abandons this diagnostic.

Definition at line 201 of file Diagnostics.cpp.

◆ append() [1/2]

template<typename... Args>
InFlightDiagnostic& mlir::InFlightDiagnostic::append ( Args &&...  args) &
inline

Append arguments to the diagnostic.

Definition at line 324 of file Diagnostics.h.

Referenced by mlir::emitOptionalError(), mlir::emitOptionalRemark(), mlir::emitOptionalWarning(), and mlir::detail::verifySymbolTable().

◆ append() [2/2]

template<typename... Args>
InFlightDiagnostic&& mlir::InFlightDiagnostic::append ( Args &&...  args) &&
inline

Definition at line 330 of file Diagnostics.h.

◆ attachNote()

Diagnostic& mlir::InFlightDiagnostic::attachNote ( Optional< Location noteLoc = llvm::None)
inline

◆ operator LogicalResult()

InFlightDiagnostic::operator LogicalResult ( ) const

Allow an inflight diagnostic to be converted to 'failure', otherwise 'success' if this is an empty diagnostic.

Definition at line 185 of file Diagnostics.cpp.

References mlir::failure().

◆ operator<<() [1/2]

template<typename Arg >
InFlightDiagnostic& mlir::InFlightDiagnostic::operator<< ( Arg &&  arg) &
inline

Stream operator for new diagnostic arguments.

Definition at line 316 of file Diagnostics.h.

◆ operator<<() [2/2]

template<typename Arg >
InFlightDiagnostic&& mlir::InFlightDiagnostic::operator<< ( Arg &&  arg) &&
inline

Definition at line 319 of file Diagnostics.h.

◆ report()

void InFlightDiagnostic::report ( )

Reports the diagnostic to the engine.

Definition at line 190 of file Diagnostics.cpp.


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