LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Global.cpp
Go to the documentation of this file.
1//===-- Global.cpp - Global dialect C API implementation --------*- C++ -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9
10#include "llzk/CAPI/Support.h"
13
15
16#include <mlir/CAPI/Registration.h>
17
18using namespace mlir;
19using namespace llzk::global;
20
21MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Global, llzk__global, GlobalDialect)
22
23//===----------------------------------------------------------------------===//
24// GlobalDefOp
25//===----------------------------------------------------------------------===//
26
27bool llzkOperationIsAGlobalDefOp(MlirOperation op) { return llvm::isa<GlobalDefOp>(unwrap(op)); }
28
29bool llzkGlobalDefOpGetIsConstant(MlirOperation op) {
30 return unwrap_cast<GlobalDefOp>(op).isConstant();
31}
bool llzkGlobalDefOpGetIsConstant(MlirOperation op)
Definition Global.cpp:29
bool llzkOperationIsAGlobalDefOp(MlirOperation op)
Definition Global.cpp:27
auto unwrap_cast(auto &from)
Definition Support.h:30