LLVM 22.0.0git
|
#include "llvm/IR/DiagnosticInfo.h"
Public Member Functions | |
DiagnosticInfoLegalizationFailure (const Twine &MsgStr LLVM_LIFETIME_BOUND, const Function &Fn, const DiagnosticLocation &Loc, DiagnosticSeverity Severity=DS_Error) | |
const Twine & | getMsgStr () const |
void | print (DiagnosticPrinter &DP) const override |
Print using the given DP a user-friendly message. | |
![]() | |
DiagnosticInfoWithLocationBase (enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const Function &Fn, const DiagnosticLocation &Loc) | |
Fn is the function where the diagnostic is being emitted. | |
bool | isLocationAvailable () const |
Return true if location information is available for this diagnostic. | |
std::string | getLocationStr () const |
Return a string with the location information for this diagnostic in the format "file:line:col". | |
void | getLocation (StringRef &RelativePath, unsigned &Line, unsigned &Column) const |
Return location information for this diagnostic in three parts: the relative source file path, line number and column. | |
std::string | getAbsolutePath () const |
Return the absolute path tot the file. | |
const Function & | getFunction () const |
DiagnosticLocation | getLocation () const |
![]() | |
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. | |
Static Public Member Functions | |
static bool | classof (const DiagnosticInfo *DI) |
Definition at line 387 of file DiagnosticInfo.h.
|
inline |
Definition at line 394 of file DiagnosticInfo.h.
References llvm::DK_LegalizationFailure.
|
inlinestatic |
Definition at line 406 of file DiagnosticInfo.h.
References llvm::DK_LegalizationFailure, and llvm::DiagnosticInfo::getKind().
Definition at line 402 of file DiagnosticInfo.h.
Referenced by print().
|
overridevirtual |
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.
Implements llvm::DiagnosticInfo.
Definition at line 84 of file DiagnosticInfo.cpp.
References llvm::DiagnosticInfoWithLocationBase::getLocationStr(), and getMsgStr().