|
LLVM
4.0.0
|
Common features for diagnostics with an associated DebugLoc. More...
#include <DiagnosticInfo.h>
Public Member Functions | |
| DiagnosticInfoWithDebugLocBase (enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const Function &Fn, const DebugLoc &DLoc) | |
Fn is the function where the diagnostic is being emitted. More... | |
| bool | isLocationAvailable () const |
| Return true if location information is available for this diagnostic. More... | |
| const std::string | getLocationStr () const |
| Return a string with the location information for this diagnostic in the format "file:line:col". More... | |
| void | getLocation (StringRef *Filename, unsigned *Line, unsigned *Column) const |
| Return location information for this diagnostic in three parts: the source file name, line number and column. More... | |
| const Function & | getFunction () const |
| const DebugLoc & | getDebugLoc () const |
Public Member Functions inherited from llvm::DiagnosticInfo | |
| 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... | |
Common features for diagnostics with an associated DebugLoc.
Definition at line 346 of file DiagnosticInfo.h.
|
inline |
Fn is the function where the diagnostic is being emitted.
DLoc is the location information to use in the diagnostic.
Definition at line 350 of file DiagnosticInfo.h.
Definition at line 369 of file DiagnosticInfo.h.
Referenced by getLocation(), isLocationAvailable(), and llvm::yaml::MappingTraits< DiagnosticInfoOptimizationBase * >::mapping().
Definition at line 368 of file DiagnosticInfo.h.
Referenced by llvm::yaml::MappingTraits< DiagnosticInfoOptimizationBase * >::mapping(), and llvm::DiagnosticInfoUnsupported::print().
| void DiagnosticInfoWithDebugLocBase::getLocation | ( | StringRef * | Filename, |
| unsigned * | Line, | ||
| unsigned * | Column | ||
| ) | const |
Return location information for this diagnostic in three parts: the source file name, line number and column.
Definition at line 155 of file DiagnosticInfo.cpp.
References assert(), getDebugLoc(), and L.
Referenced by getLocationStr().
| const std::string DiagnosticInfoWithDebugLocBase::getLocationStr | ( | ) | const |
Return a string with the location information for this diagnostic in the format "file:line:col".
If location information is not available, it returns "<unknown>:0:0".
Definition at line 165 of file DiagnosticInfo.cpp.
References getLocation(), and isLocationAvailable().
Referenced by llvm::DiagnosticInfoOptimizationBase::print(), and llvm::DiagnosticInfoUnsupported::print().
| bool DiagnosticInfoWithDebugLocBase::isLocationAvailable | ( | ) | const |
Return true if location information is available for this diagnostic.
Definition at line 151 of file DiagnosticInfo.cpp.
References getDebugLoc().
Referenced by getLocationStr().
1.8.6