mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 04:09:45 +00:00
OptDiag: Rename DiagnosticInfoWithDebugLoc to WithLocation. NFC
This generalizes the name in preparation for decoupling the concept from DebugLoc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a24db2314e
commit
67d9e19554
@ -348,11 +348,11 @@ private:
|
||||
};
|
||||
|
||||
/// 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)
|
||||
@ -383,7 +383,7 @@ private:
|
||||
|
||||
/// \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 {};
|
||||
@ -419,7 +419,7 @@ public:
|
||||
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);
|
||||
@ -908,8 +908,7 @@ public:
|
||||
};
|
||||
|
||||
/// Diagnostic information for unsupported feature in backend.
|
||||
class DiagnosticInfoUnsupported
|
||||
: public DiagnosticInfoWithDebugLocBase {
|
||||
class DiagnosticInfoUnsupported : public DiagnosticInfoWithLocationBase {
|
||||
private:
|
||||
Twine Msg;
|
||||
|
||||
@ -923,7 +922,7 @@ public:
|
||||
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) {
|
||||
|
@ -148,11 +148,11 @@ void DiagnosticInfoPGOProfile::print(DiagnosticPrinter &DP) const {
|
||||
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();
|
||||
@ -162,7 +162,7 @@ void DiagnosticInfoWithDebugLocBase::getLocation(StringRef *Filename,
|
||||
*Column = L->getColumn();
|
||||
}
|
||||
|
||||
const std::string DiagnosticInfoWithDebugLocBase::getLocationStr() const {
|
||||
const std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
|
||||
StringRef Filename("<unknown>");
|
||||
unsigned Line = 0;
|
||||
unsigned Column = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user