LLVM  14.0.0git
Public Member Functions | List of all members
llvm::DiagnosticInfo Class Referenceabstract

This is the base abstract class for diagnostic reporting in the backend. More...

#include "llvm/IR/DiagnosticInfo.h"

Inheritance diagram for llvm::DiagnosticInfo:
Inheritance graph
[legend]

Public Member Functions

 DiagnosticInfo (int Kind, DiagnosticSeverity Severity)
 
virtual ~DiagnosticInfo ()=default
 
int getKind () const
 
DiagnosticSeverity getSeverity () const
 
virtual void print (DiagnosticPrinter &DP) const =0
 Print using the given DP a user-friendly message. More...
 

Detailed Description

This is the base abstract class for diagnostic reporting in the backend.

The print method must be overloaded by the subclasses to print a user-friendly message in the client of the backend (let us call it a frontend).

Definition at line 103 of file DiagnosticInfo.h.

Constructor & Destructor Documentation

◆ DiagnosticInfo()

llvm::DiagnosticInfo::DiagnosticInfo ( int  Kind,
DiagnosticSeverity  Severity 
)
inline

Definition at line 112 of file DiagnosticInfo.h.

◆ ~DiagnosticInfo()

virtual llvm::DiagnosticInfo::~DiagnosticInfo ( )
virtualdefault

Member Function Documentation

◆ getKind()

int llvm::DiagnosticInfo::getKind ( ) const
inline

◆ getSeverity()

DiagnosticSeverity llvm::DiagnosticInfo::getSeverity ( ) const
inline

◆ print()

virtual void llvm::DiagnosticInfo::print ( DiagnosticPrinter DP) const
pure virtual

Print using the given DP a user-friendly message.

This is the default message that will be printed to the user. It is used when the frontend does not directly take advantage of the information contained in fields of the subclasses. The printed message must not end with '.' nor start with a severity keyword.

Implemented in llvm::DiagnosticInfoDontCall, llvm::DiagnosticInfoSrcMgr, llvm::DiagnosticInfoUnsupported, llvm::DiagnosticInfoISelFallback, llvm::DiagnosticInfoMIRParser, llvm::DiagnosticInfoOptimizationBase, llvm::DiagnosticInfoPGOProfile, llvm::DiagnosticInfoSampleProfile, llvm::DiagnosticInfoIgnoringInvalidDebugMetadata, llvm::DiagnosticInfoDebugMetadataVersion, llvm::DiagnosticInfoResourceLimit, llvm::DiagnosticInfoInlineAsm, and llvm::LinkDiagnosticInfo.

Referenced by llvm::LLVMContext::diagnose(), and llvm::LTOCodeGenerator::DiagnosticHandler().


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