12#ifndef LLVM_IR_DIAGNOSTICHANDLER_H
13#define LLVM_IR_DIAGNOSTICHANDLER_H
26 void *DiagnosticContext =
nullptr;
27 bool HasErrors =
false;
29 : DiagnosticContext(DiagContext) {}
45 if (DiagHandlerCallback) {
46 DiagHandlerCallback(&DI, DiagnosticContext);
66 return (isMissedOptRemarkEnabled(
PassName) ||
67 isPassedOptRemarkEnabled(
PassName) ||
72 virtual bool isAnyRemarkEnabled()
const;
static const char PassName[]
This is the base abstract class for diagnostic reporting in the backend.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
This is the base class for diagnostic handling in LLVM.
virtual bool handleDiagnostics(const DiagnosticInfo &DI)
Override handleDiagnostics to provide custom implementation.
virtual ~DiagnosticHandler()=default
void(*)(const DiagnosticInfo *DI, void *Context) DiagnosticHandlerTy
bool isAnyRemarkEnabled(StringRef PassName) const
Return true if any type of remarks are enabled for this pass.
DiagnosticHandler(void *DiagContext=nullptr)