[llvm] r213399 - Rename DiagnosticInfoOptimizationWarning to DiagnosticInfoOptimizationFailure
Tyler Nowicki
tnowicki at apple.com
Fri Jul 18 12:36:04 PDT 2014
Author: tnowicki
Date: Fri Jul 18 14:36:04 2014
New Revision: 213399
URL: http://llvm.org/viewvc/llvm-project?rev=213399&view=rev
Log:
Rename DiagnosticInfoOptimizationWarning to DiagnosticInfoOptimizationFailure
so the severity of the message is not part of the type name.
Reviewed by Alp Toker
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=213399&r1=213398&r2=213399&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Fri Jul 18 14:36:04 2014
@@ -51,7 +51,7 @@ enum DiagnosticKind {
DK_OptimizationRemark,
DK_OptimizationRemarkMissed,
DK_OptimizationRemarkAnalysis,
- DK_OptimizationWarning,
+ DK_OptimizationFailure,
DK_FirstPluginKind
};
@@ -412,8 +412,8 @@ void emitOptimizationRemarkAnalysis(LLVM
const Function &Fn, const DebugLoc &DLoc,
const Twine &Msg);
-/// Diagnostic information for optimization warnings.
-class DiagnosticInfoOptimizationWarning
+/// Diagnostic information for optimization failures.
+class DiagnosticInfoOptimizationFailure
: public DiagnosticInfoOptimizationBase {
public:
/// \p Fn is the function where the diagnostic is being emitted. \p DLoc is
@@ -422,13 +422,13 @@ public:
/// location. \p Msg is the message to show. Note that this class does not
/// copy this message, so this reference must be valid for the whole life time
/// of the diagnostic.
- DiagnosticInfoOptimizationWarning(const Function &Fn, const DebugLoc &DLoc,
+ DiagnosticInfoOptimizationFailure(const Function &Fn, const DebugLoc &DLoc,
const Twine &Msg)
- : DiagnosticInfoOptimizationBase(DK_OptimizationWarning, DS_Warning,
+ : DiagnosticInfoOptimizationBase(DK_OptimizationFailure, DS_Warning,
nullptr, Fn, DLoc, Msg) {}
static bool classof(const DiagnosticInfo *DI) {
- return DI->getKind() == DK_OptimizationWarning;
+ return DI->getKind() == DK_OptimizationFailure;
}
/// \see DiagnosticInfoOptimizationBase::isEnabled.
Modified: llvm/trunk/lib/IR/DiagnosticInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=213399&r1=213398&r2=213399&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DiagnosticInfo.cpp (original)
+++ llvm/trunk/lib/IR/DiagnosticInfo.cpp Fri Jul 18 14:36:04 2014
@@ -190,19 +190,19 @@ void llvm::emitOptimizationRemarkAnalysi
DiagnosticInfoOptimizationRemarkAnalysis(PassName, Fn, DLoc, Msg));
}
-bool DiagnosticInfoOptimizationWarning::isEnabled() const {
+bool DiagnosticInfoOptimizationFailure::isEnabled() const {
// Only print warnings.
return getSeverity() == DS_Warning;
}
void llvm::emitLoopVectorizeWarning(LLVMContext &Ctx, const Function &Fn,
const DebugLoc &DLoc, const Twine &Msg) {
- Ctx.diagnose(DiagnosticInfoOptimizationWarning(
+ Ctx.diagnose(DiagnosticInfoOptimizationFailure(
Fn, DLoc, Twine("loop not vectorized: " + Msg)));
}
void llvm::emitLoopInterleaveWarning(LLVMContext &Ctx, const Function &Fn,
const DebugLoc &DLoc, const Twine &Msg) {
- Ctx.diagnose(DiagnosticInfoOptimizationWarning(
+ Ctx.diagnose(DiagnosticInfoOptimizationFailure(
Fn, DLoc, Twine("loop not interleaved: " + Msg)));
}
More information about the llvm-commits
mailing list