MLIR 23.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#include "mlir/IR/Dialect.h"
19
20//===----------------------------------------------------------------------===//
21// BuiltinDialectVersion
22//===----------------------------------------------------------------------===//
23
25 BuiltinDialectVersion(int64_t version) : version(version) {}
26
27 int64_t getVersion() const { return version; }
28
30
31 bool operator<(const BuiltinDialectVersion &other) const {
32 return version < other.version;
33 }
34
35private:
36 int64_t version;
37};
38
39//===----------------------------------------------------------------------===//
40// Dialect
41//===----------------------------------------------------------------------===//
42
43#include "mlir/IR/BuiltinDialect.h.inc"
44
45#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