MLIR 24.0.0git
BuiltinDialect.h
Go to the documentation of this file.
1//===- BuiltinDialect.h - MLIR Builtin Dialect ------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the Builtin dialect that contains all of the attributes,
10// operations, and types that are necessary for the validity of the IR.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_IR_BUILTINDIALECT_H_
15#define MLIR_IR_BUILTINDIALECT_H_
16
18
19//===----------------------------------------------------------------------===//
20// BuiltinDialectVersion
21//===----------------------------------------------------------------------===//
22
24 BuiltinDialectVersion(int64_t version) : version(version) {}
25
26 int64_t getVersion() const { return version; }
27
29
30 bool operator<(const BuiltinDialectVersion &other) const {
31 return version < other.version;
32 }
33
34private:
35 int64_t version;
36};
37
38//===----------------------------------------------------------------------===//
39// Dialect
40//===----------------------------------------------------------------------===//
41
42#include "mlir/IR/BuiltinDialect.h.inc"
43
44#endif // MLIR_IR_BUILTINDIALECT_H_
This class is used to represent the version of a dialect, for the purpose of polymorphic destruction.
BuiltinDialectVersion(int64_t version)
bool operator<(const BuiltinDialectVersion &other) const
static BuiltinDialectVersion getCurrentVersion()
int64_t getVersion() const