LLZK
0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Attrs.cpp
Go to the documentation of this file.
1
//===-- Attrs.cpp - POD attributes implementation ---------------*- 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
#include "
llzk/Dialect/POD/IR/Attrs.h
"
11
12
#include <mlir/IR/BuiltinAttributes.h>
13
#include <mlir/IR/OpImplementation.h>
14
15
#include <llvm/Support/Debug.h>
16
17
using namespace
mlir
;
18
19
namespace
llzk::pod
{
20
21
//===----------------------------------------------------------------------===//
22
// RecordAttr
23
//===----------------------------------------------------------------------===//
24
25
FlatSymbolRefAttr RecordAttr::getNameSym()
const
{
return
FlatSymbolRefAttr::get(getName()); }
26
27
ParseResult
parseRecord
(AsmParser &parser, StringAttr &name, Type &type) {
28
auto
result = parser.parseSymbolName(name);
29
if
(mlir::failed(result)) {
30
return
result;
31
}
32
return
parser.parseColonType(type);
33
}
34
35
void
printRecord
(AsmPrinter &printer, StringAttr name, Type type) {
36
printer.printSymbolName(name.getValue());
37
printer <<
": "
;
38
printer.printType(type);
39
}
40
41
}
// namespace llzk::pod
Attrs.h
llzk::pod
Definition
Attrs.cpp:19
llzk::pod::printRecord
void printRecord(AsmPrinter &printer, StringAttr name, Type type)
Definition
Attrs.cpp:35
llzk::pod::parseRecord
ParseResult parseRecord(AsmParser &parser, StringAttr &name, Type &type)
Definition
Attrs.cpp:27
mlir
Definition
AnalysisPassEnums.h.inc:39
lib
Dialect
POD
IR
Attrs.cpp
Generated by
1.14.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.