LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
InitializerUtils.h
Go to the documentation of this file.
1//===-- InitializerUtils.h - Global initializer normalization ---*- 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
13
14#include <mlir/IR/Attributes.h>
15
16namespace llzk::global {
17
20 mlir::Type type;
21 mlir::Attribute value;
22};
23
28mlir::FailureOr<NormalizedGlobalInitializer>
29normalizeGlobalInitializer(mlir::Type type, mlir::Attribute value, EmitErrorFn emitError);
30
31} // namespace llzk::global
mlir::FailureOr< NormalizedGlobalInitializer > normalizeGlobalInitializer(mlir::Type type, mlir::Attribute value, EmitErrorFn emitError)
Normalize unambiguous initializer representations and their declared type.
llvm::function_ref< InFlightDiagnosticWrapper()> EmitErrorFn
Callback to produce an error diagnostic.
A global initializer and its normalized type.