LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
ConstraintDiagnostics.h
Go to the documentation of this file.
1//===-- ConstraintDiagnostics.h ---------------------------------*- C++ -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2026 Project LLZK
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9
10#pragma once
11
12#include <mlir/IR/Diagnostics.h>
13#include <mlir/IR/Operation.h>
14
15#include <llvm/ADT/StringRef.h>
16#include <llvm/ADT/Twine.h>
17
20inline constexpr llvm::StringLiteral CONSTRAINT_DIAGNOSTIC_PREFIX = "llzk-flatten-constraints: ";
21
23inline mlir::LogicalResult constraintError(mlir::Operation *site, const llvm::Twine &message) {
24 return site->emitError(CONSTRAINT_DIAGNOSTIC_PREFIX) << message;
25}
26} // namespace llzk::polymorphic::detail
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
mlir::LogicalResult constraintError(mlir::Operation *site, const llvm::Twine &message)
Emit the common diagnostic prefix for constraint expansion and storage helpers.
constexpr llvm::StringLiteral CONSTRAINT_DIAGNOSTIC_PREFIX
Identify expansion diagnostics separately from IR verifier errors.