Files
clang-p2996/mlir/examples/standalone/lib/Standalone/StandaloneDialect.cpp
Marius Brehler 83e9ef7e51 [mlir][standalone] Extend sample with custom type
This extends the standalone example to illustrate how to structure the
files needed to create own types.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D143715
2023-02-17 15:14:56 +01:00

29 lines
934 B
C++

//===- StandaloneDialect.cpp - Standalone dialect ---------------*- C++ -*-===//
//
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "Standalone/StandaloneDialect.h"
#include "Standalone/StandaloneOps.h"
#include "Standalone/StandaloneTypes.h"
using namespace mlir;
using namespace mlir::standalone;
#include "Standalone/StandaloneOpsDialect.cpp.inc"
//===----------------------------------------------------------------------===//
// Standalone dialect.
//===----------------------------------------------------------------------===//
void StandaloneDialect::initialize() {
addOperations<
#define GET_OP_LIST
#include "Standalone/StandaloneOps.cpp.inc"
>();
registerTypes();
}