LLVM
8.0.1
|
This is the base class for diagnostic handling in LLVM. More...
#include "llvm/IR/DiagnosticHandler.h"
Public Types | |
using | DiagnosticHandlerTy = void(*)(const DiagnosticInfo &DI, void *Context) |
Public Member Functions | |
DiagnosticHandler (void *DiagContext=nullptr) | |
virtual | ~DiagnosticHandler ()=default |
virtual bool | handleDiagnostics (const DiagnosticInfo &DI) |
Override handleDiagnostics to provide custom implementation. More... | |
virtual bool | isAnalysisRemarkEnabled (StringRef PassName) const |
Return true if analysis remarks are enabled, override to provide different implementation. More... | |
virtual bool | isMissedOptRemarkEnabled (StringRef PassName) const |
Return true if missed optimization remarks are enabled, override to provide different implementation. More... | |
virtual bool | isPassedOptRemarkEnabled (StringRef PassName) const |
Return true if passed optimization remarks are enabled, override to provide different implementation. More... | |
bool | isAnyRemarkEnabled (StringRef PassName) const |
Return true if any type of remarks are enabled for this pass. More... | |
virtual bool | isAnyRemarkEnabled () const |
Return true if any type of remarks are enabled for any pass. More... | |
Public Attributes | |
void * | DiagnosticContext = nullptr |
DiagnosticHandlerTy | DiagHandlerCallback = nullptr |
DiagHandlerCallback is settable from the C API and base implementation of DiagnosticHandler will call it from handleDiagnostics(). More... | |
This is the base class for diagnostic handling in LLVM.
The handleDiagnostics method must be overriden by the subclasses to handle diagnostic. The *RemarkEnabled methods can be overriden to control which remarks are enabled.
Definition at line 25 of file DiagnosticHandler.h.
using llvm::DiagnosticHandler::DiagnosticHandlerTy = void (*)(const DiagnosticInfo &DI, void *Context) |
Definition at line 31 of file DiagnosticHandler.h.
|
inline |
Definition at line 27 of file DiagnosticHandler.h.
References ~DiagnosticHandler().
|
virtualdefault |
Referenced by DiagnosticHandler().
|
inlinevirtual |
Override handleDiagnostics to provide custom implementation.
Return true if it handles diagnostics reporting properly otherwise return false to make LLVMContext::diagnose() to print the message with a prefix based on the severity.
Reimplemented in llvm::lto::LTOLLVMDiagnosticHandler.
Definition at line 43 of file DiagnosticHandler.h.
References DiagHandlerCallback, isAnalysisRemarkEnabled(), isMissedOptRemarkEnabled(), and isPassedOptRemarkEnabled().
Return true if analysis remarks are enabled, override to provide different implementation.
Definition at line 75 of file DiagnosticHandler.cpp.
Referenced by handleDiagnostics(), isAnyRemarkEnabled(), llvm::MachineOptimizationRemarkAnalysis::isEnabled(), llvm::OptimizationRemarkAnalysis::isEnabled(), and llvm::Module::shouldEmitInstrCountChangedRemark().
Return true if any type of remarks are enabled for this pass.
Definition at line 64 of file DiagnosticHandler.h.
References isAnalysisRemarkEnabled(), isAnyRemarkEnabled(), isMissedOptRemarkEnabled(), and isPassedOptRemarkEnabled().
Referenced by llvm::OptimizationRemarkEmitter::allowExtraAnalysis(), and llvm::OptimizationRemarkEmitter::emit().
|
virtual |
Return true if any type of remarks are enabled for any pass.
Definition at line 88 of file DiagnosticHandler.cpp.
Referenced by isAnyRemarkEnabled().
Return true if missed optimization remarks are enabled, override to provide different implementation.
Definition at line 79 of file DiagnosticHandler.cpp.
Referenced by handleDiagnostics(), isAnyRemarkEnabled(), llvm::MachineOptimizationRemarkMissed::isEnabled(), and llvm::OptimizationRemarkMissed::isEnabled().
Return true if passed optimization remarks are enabled, override to provide different implementation.
Definition at line 83 of file DiagnosticHandler.cpp.
Referenced by handleDiagnostics(), isAnyRemarkEnabled(), llvm::MachineOptimizationRemark::isEnabled(), and llvm::OptimizationRemark::isEnabled().
DiagnosticHandlerTy llvm::DiagnosticHandler::DiagHandlerCallback = nullptr |
DiagHandlerCallback is settable from the C API and base implementation of DiagnosticHandler will call it from handleDiagnostics().
Any derived class of DiagnosticHandler should not use callback but implement handleDiagnostics().
Definition at line 37 of file DiagnosticHandler.h.
Referenced by handleDiagnostics().
void* llvm::DiagnosticHandler::DiagnosticContext = nullptr |
Definition at line 26 of file DiagnosticHandler.h.