[llvm] r295465 - OptDiag: Rename DiagnosticInfoWithDebugLoc to WithLocation. NFC
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 09:34:38 PST 2017
Author: bogner
Date: Fri Feb 17 11:34:37 2017
New Revision: 295465
URL: http://llvm.org/viewvc/llvm-project?rev=295465&view=rev
Log:
OptDiag: Rename DiagnosticInfoWithDebugLoc to WithLocation. NFC
This generalizes the name in preparation for decoupling the concept
from DebugLoc.
Modified:
llvm/trunk/include/llvm/IR/DiagnosticInfo.h
llvm/trunk/lib/IR/DiagnosticInfo.cpp
Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=295465&r1=295464&r2=295465&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Fri Feb 17 11:34:37 2017
@@ -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) {
Modified: llvm/trunk/lib/IR/DiagnosticInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=295465&r1=295464&r2=295465&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DiagnosticInfo.cpp (original)
+++ llvm/trunk/lib/IR/DiagnosticInfo.cpp Fri Feb 17 11:34:37 2017
@@ -148,11 +148,11 @@ void DiagnosticInfoPGOProfile::print(Dia
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::get
*Column = L->getColumn();
}
-const std::string DiagnosticInfoWithDebugLocBase::getLocationStr() const {
+const std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
StringRef Filename("<unknown>");
unsigned Line = 0;
unsigned Column = 0;
More information about the llvm-commits
mailing list