1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Rename DiagnosticInfoOptimizationWarning to DiagnosticInfoOptimizationFailure

so the severity of the message is not part of the type name.

Reviewed by Alp Toker

llvm-svn: 213399
This commit is contained in:
Tyler Nowicki 2014-07-18 19:36:04 +00:00
parent c9ff12e4fa
commit 9f432ebc6e
2 changed files with 9 additions and 9 deletions

View File

@ -51,7 +51,7 @@ enum DiagnosticKind {
DK_OptimizationRemark, DK_OptimizationRemark,
DK_OptimizationRemarkMissed, DK_OptimizationRemarkMissed,
DK_OptimizationRemarkAnalysis, DK_OptimizationRemarkAnalysis,
DK_OptimizationWarning, DK_OptimizationFailure,
DK_FirstPluginKind DK_FirstPluginKind
}; };
@ -412,8 +412,8 @@ void emitOptimizationRemarkAnalysis(LLVMContext &Ctx, const char *PassName,
const Function &Fn, const DebugLoc &DLoc, const Function &Fn, const DebugLoc &DLoc,
const Twine &Msg); const Twine &Msg);
/// Diagnostic information for optimization warnings. /// Diagnostic information for optimization failures.
class DiagnosticInfoOptimizationWarning class DiagnosticInfoOptimizationFailure
: public DiagnosticInfoOptimizationBase { : public DiagnosticInfoOptimizationBase {
public: public:
/// \p Fn is the function where the diagnostic is being emitted. \p DLoc is /// \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 /// 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 /// copy this message, so this reference must be valid for the whole life time
/// of the diagnostic. /// of the diagnostic.
DiagnosticInfoOptimizationWarning(const Function &Fn, const DebugLoc &DLoc, DiagnosticInfoOptimizationFailure(const Function &Fn, const DebugLoc &DLoc,
const Twine &Msg) const Twine &Msg)
: DiagnosticInfoOptimizationBase(DK_OptimizationWarning, DS_Warning, : DiagnosticInfoOptimizationBase(DK_OptimizationFailure, DS_Warning,
nullptr, Fn, DLoc, Msg) {} nullptr, Fn, DLoc, Msg) {}
static bool classof(const DiagnosticInfo *DI) { static bool classof(const DiagnosticInfo *DI) {
return DI->getKind() == DK_OptimizationWarning; return DI->getKind() == DK_OptimizationFailure;
} }
/// \see DiagnosticInfoOptimizationBase::isEnabled. /// \see DiagnosticInfoOptimizationBase::isEnabled.

View File

@ -190,19 +190,19 @@ void llvm::emitOptimizationRemarkAnalysis(LLVMContext &Ctx,
DiagnosticInfoOptimizationRemarkAnalysis(PassName, Fn, DLoc, Msg)); DiagnosticInfoOptimizationRemarkAnalysis(PassName, Fn, DLoc, Msg));
} }
bool DiagnosticInfoOptimizationWarning::isEnabled() const { bool DiagnosticInfoOptimizationFailure::isEnabled() const {
// Only print warnings. // Only print warnings.
return getSeverity() == DS_Warning; return getSeverity() == DS_Warning;
} }
void llvm::emitLoopVectorizeWarning(LLVMContext &Ctx, const Function &Fn, void llvm::emitLoopVectorizeWarning(LLVMContext &Ctx, const Function &Fn,
const DebugLoc &DLoc, const Twine &Msg) { const DebugLoc &DLoc, const Twine &Msg) {
Ctx.diagnose(DiagnosticInfoOptimizationWarning( Ctx.diagnose(DiagnosticInfoOptimizationFailure(
Fn, DLoc, Twine("loop not vectorized: " + Msg))); Fn, DLoc, Twine("loop not vectorized: " + Msg)));
} }
void llvm::emitLoopInterleaveWarning(LLVMContext &Ctx, const Function &Fn, void llvm::emitLoopInterleaveWarning(LLVMContext &Ctx, const Function &Fn,
const DebugLoc &DLoc, const Twine &Msg) { const DebugLoc &DLoc, const Twine &Msg) {
Ctx.diagnose(DiagnosticInfoOptimizationWarning( Ctx.diagnose(DiagnosticInfoOptimizationFailure(
Fn, DLoc, Twine("loop not interleaved: " + Msg))); Fn, DLoc, Twine("loop not interleaved: " + Msg)));
} }