struct DiagnosticHandler
Declaration
struct DiagnosticHandler { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:24
Member Variables
- public void* DiagnosticContext = nullptr
- public llvm::DiagnosticHandler::DiagnosticHandlerTy 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().
Method Overview
- public DiagnosticHandler(void * DiagContext = nullptr)
- public virtual bool handleDiagnostics(const llvm::DiagnosticInfo & DI)
- public virtual bool isAnalysisRemarkEnabled(llvm::StringRef PassName) const
- public bool isAnyRemarkEnabled(llvm::StringRef PassName) const
- public virtual bool isAnyRemarkEnabled() const
- public virtual bool isMissedOptRemarkEnabled(llvm::StringRef PassName) const
- public virtual bool isPassedOptRemarkEnabled(llvm::StringRef PassName) const
- public virtual ~DiagnosticHandler()
Methods
¶DiagnosticHandler(void* DiagContext = nullptr)
DiagnosticHandler(void* DiagContext = nullptr)
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:26
Parameters
- void* DiagContext = nullptr
¶virtual bool handleDiagnostics(
const llvm::DiagnosticInfo& DI)
virtual bool handleDiagnostics(
const llvm::DiagnosticInfo& DI)
Description
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.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:42
Parameters
- const llvm::DiagnosticInfo& DI
¶virtual bool isAnalysisRemarkEnabled(
llvm::StringRef PassName) const
virtual bool isAnalysisRemarkEnabled(
llvm::StringRef PassName) const
Description
Return true if analysis remarks are enabled, override to provide different implementation.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:52
Parameters
- llvm::StringRef PassName
¶bool isAnyRemarkEnabled(
llvm::StringRef PassName) const
bool isAnyRemarkEnabled(
llvm::StringRef PassName) const
Description
Return true if any type of remarks are enabled for this pass.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:63
Parameters
- llvm::StringRef PassName
¶virtual bool isAnyRemarkEnabled() const
virtual bool isAnyRemarkEnabled() const
Description
Return true if any type of remarks are enabled for any pass.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:70
¶virtual bool isMissedOptRemarkEnabled(
llvm::StringRef PassName) const
virtual bool isMissedOptRemarkEnabled(
llvm::StringRef PassName) const
Description
Return true if missed optimization remarks are enabled, override to provide different implementation.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:56
Parameters
- llvm::StringRef PassName
¶virtual bool isPassedOptRemarkEnabled(
llvm::StringRef PassName) const
virtual bool isPassedOptRemarkEnabled(
llvm::StringRef PassName) const
Description
Return true if passed optimization remarks are enabled, override to provide different implementation.
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:60
Parameters
- llvm::StringRef PassName
¶virtual ~DiagnosticHandler()
virtual ~DiagnosticHandler()
Declared at: llvm/include/llvm/IR/DiagnosticHandler.h:28