LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
ErrorHelper.h File Reference
#include <mlir/IR/Diagnostics.h>
#include <mlir/IR/Operation.h>
#include <llvm/ADT/STLFunctionalExtras.h>
#include <llvm/ADT/Twine.h>
#include <llvm/Support/ErrorHandling.h>
#include <variant>
Include dependency graph for ErrorHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llzk::InFlightDiagnosticWrapper
 Wrapper around InFlightDiagnostic that can either be a regular InFlightDiagnostic or a special version that asserts false after reporting the diagnostic. More...

Namespaces

namespace  llzk

Typedefs

using llzk::EmitErrorFn = llvm::function_ref<InFlightDiagnosticWrapper()>
 Callback to produce an error diagnostic.
using llzk::OwningEmitErrorFn = std::function<InFlightDiagnosticWrapper()>
 This type is required in cases like the functions below to take ownership of the lambda so it is not destroyed upon return from the function.

Functions

OwningEmitErrorFn llzk::getEmitOpErrFn (mlir::Operation *op)
template<typename OpImplClass>
OwningEmitErrorFn llzk::getEmitOpErrFn (OpImplClass *opImpl)
void llzk::ensure (bool condition, const llvm::Twine &errMsg)
OwningEmitErrorFn llzk::wrapNullableInFlightDiagnostic (llvm::function_ref< mlir::InFlightDiagnostic()> emitError, mlir::MLIRContext *ctx)
 If the given emitError is non-null, return it.
OwningEmitErrorFn llzk::wrapNonNullableInFlightDiagnostic (llvm::function_ref< mlir::InFlightDiagnostic()> emitError)