LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Include.cpp
Go to the documentation of this file.
1//===-- Include.cpp - Include 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
11
12#include "llzk/CAPI/Support.h"
16
17#include <mlir-c/Pass.h>
18
19#include <mlir/CAPI/Pass.h>
20#include <mlir/CAPI/Registration.h>
21#include <mlir/CAPI/Wrap.h>
22
23using namespace llzk::include;
24
25static void registerLLZKIncludeTransformationPasses() { registerTransformationPasses(); }
26
27// Include the generated CAPI
30
31MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Include, llzk__include, IncludeDialect)
32
34 MlirLocation location, MlirStringRef name, MlirStringRef path
35) {
36 return wrap(IncludeOp::create(unwrap(location), unwrap(name), unwrap(path)));
37}
MlirOperation llzkInclude_IncludeOpCreateInferredContext(MlirLocation location, MlirStringRef name, MlirStringRef path)
Creates an IncludeOp pointing to another MLIR file.
Definition Include.cpp:33
static IncludeOp create(::mlir::Location, ::llvm::StringRef name, ::llvm::StringRef path)
void registerTransformationPasses()