LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
BuilderHelper.h
Go to the documentation of this file.
1//===-- BuilderHelper.h -----------------------------------------*- 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#pragma once
11
12#include <mlir/IR/Builders.h>
13#include <mlir/IR/Location.h>
14
15namespace llzk {
16
17template <typename OpClass, typename... Args>
18inline OpClass delegate_to_build(mlir::Location location, Args &&...args) {
19 mlir::OpBuilder builder(location->getContext());
20 return builder.create<OpClass>(location, std::forward<Args>(args)...);
21}
22
23} // namespace llzk
OpClass delegate_to_build(mlir::Location location, Args &&...args)