MLIR 22.0.0git
mlir::detail::DiagnosticEngineImpl Struct Reference

Public Member Functions

void emit (Diagnostic &&diag)
 Emit a diagnostic using the registered issue handle if present, or with the default behavior if not.

Public Attributes

llvm::sys::SmartMutex< truemutex
 A mutex to ensure that diagnostics emission is thread-safe.
llvm::SmallMapVector< DiagnosticEngine::HandlerID, DiagnosticEngine::HandlerTy, 2 > handlers
 These are the handlers used to report diagnostics.
DiagnosticEngine::HandlerID uniqueHandlerId = 1
 This is a unique identifier counter for diagnostic handlers in the context.

Detailed Description

Definition at line 229 of file Diagnostics.cpp.

Member Function Documentation

◆ emit()

void DiagnosticEngineImpl::emit ( Diagnostic && diag)

Emit a diagnostic using the registered issue handle if present, or with the default behavior if not.

Definition at line 251 of file Diagnostics.cpp.

References diag(), mlir::Error, handlers, and mutex.

Member Data Documentation

◆ handlers

llvm::SmallMapVector<DiagnosticEngine::HandlerID, DiagnosticEngine::HandlerTy, 2> mlir::detail::DiagnosticEngineImpl::handlers

These are the handlers used to report diagnostics.

Definition at line 240 of file Diagnostics.cpp.

Referenced by emit().

◆ mutex

llvm::sys::SmartMutex<true> mlir::detail::DiagnosticEngineImpl::mutex

A mutex to ensure that diagnostics emission is thread-safe.

Definition at line 235 of file Diagnostics.cpp.

Referenced by emit().

◆ uniqueHandlerId

DiagnosticEngine::HandlerID mlir::detail::DiagnosticEngineImpl::uniqueHandlerId = 1

This is a unique identifier counter for diagnostic handlers in the context.

This id starts at 1 to allow for 0 to be used as a sentinel.

Definition at line 244 of file Diagnostics.cpp.


The documentation for this struct was generated from the following file: