};
/// Common features for diagnostics with an associated DebugLoc
-class DiagnosticInfoWithDebugLocBase : public DiagnosticInfo {
+class DiagnosticInfoWithLocationBase : public DiagnosticInfo {
public:
/// \p Fn is the function where the diagnostic is being emitted. \p DLoc is
/// the location information to use in the diagnostic.
- DiagnosticInfoWithDebugLocBase(enum DiagnosticKind Kind,
+ DiagnosticInfoWithLocationBase(enum DiagnosticKind Kind,
enum DiagnosticSeverity Severity,
const Function &Fn,
const DebugLoc &DLoc)
/// \brief Common features for diagnostics dealing with optimization remarks
/// that are used by both IR and MIR passes.
-class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithDebugLocBase {
+class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithLocationBase {
public:
/// \brief Used to set IsVerbose via the stream interface.
struct setIsVerbose {};
enum DiagnosticSeverity Severity,
const char *PassName, StringRef RemarkName,
const Function &Fn, const DebugLoc &DLoc)
- : DiagnosticInfoWithDebugLocBase(Kind, Severity, Fn, DLoc),
+ : DiagnosticInfoWithLocationBase(Kind, Severity, Fn, DLoc),
PassName(PassName), RemarkName(RemarkName) {}
DiagnosticInfoOptimizationBase &operator<<(StringRef S);
};
/// Diagnostic information for unsupported feature in backend.
-class DiagnosticInfoUnsupported
- : public DiagnosticInfoWithDebugLocBase {
+class DiagnosticInfoUnsupported : public DiagnosticInfoWithLocationBase {
private:
Twine Msg;
DiagnosticInfoUnsupported(const Function &Fn, const Twine &Msg,
DebugLoc DLoc = DebugLoc(),
DiagnosticSeverity Severity = DS_Error)
- : DiagnosticInfoWithDebugLocBase(DK_Unsupported, Severity, Fn, DLoc),
+ : DiagnosticInfoWithLocationBase(DK_Unsupported, Severity, Fn, DLoc),
Msg(Msg) {}
static bool classof(const DiagnosticInfo *DI) {
DP << getMsg();
}
-bool DiagnosticInfoWithDebugLocBase::isLocationAvailable() const {
+bool DiagnosticInfoWithLocationBase::isLocationAvailable() const {
return getDebugLoc();
}
-void DiagnosticInfoWithDebugLocBase::getLocation(StringRef *Filename,
+void DiagnosticInfoWithLocationBase::getLocation(StringRef *Filename,
unsigned *Line,
unsigned *Column) const {
DILocation *L = getDebugLoc();
*Column = L->getColumn();
}
-const std::string DiagnosticInfoWithDebugLocBase::getLocationStr() const {
+const std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
StringRef Filename("<unknown>");
unsigned Line = 0;
unsigned Column = 0;