diff --git a/include/circt/Dialect/RTL/Types.h b/include/circt/Dialect/RTL/Types.h index e5c80742d4..bfa9b9b073 100644 --- a/include/circt/Dialect/RTL/Types.h +++ b/include/circt/Dialect/RTL/Types.h @@ -8,10 +8,12 @@ #ifndef CIRCT_DIALECT_RTL_TYPES_H #define CIRCT_DIALECT_RTL_TYPES_H -#include "mlir/IR/Dialect.h" -#include "mlir/IR/Operation.h" +#include "mlir/IR/Types.h" -#include "Dialect.h" +namespace mlir { +class DialectAsmParser; +class DialectAsmPrinter; +} // namespace mlir #define GET_TYPEDEF_CLASSES #include "circt/Dialect/RTL/RTLTypes.h.inc" diff --git a/include/circt/Dialect/RTL/Types.td b/include/circt/Dialect/RTL/Types.td index f75cdf56d3..6dee297915 100644 --- a/include/circt/Dialect/RTL/Types.td +++ b/include/circt/Dialect/RTL/Types.td @@ -18,10 +18,5 @@ def ArrayType : RTLType<"Array"> { }]; let mnemonic = "array"; - - let parameters = ( - ins - "::mlir::Type":$innerType, - "size_t":$size - ); + let parameters = (ins "::mlir::Type":$innerType, "size_t":$size); } diff --git a/lib/Dialect/RTL/Dialect.cpp b/lib/Dialect/RTL/Dialect.cpp index cd3b58744f..17c6c197e1 100644 --- a/lib/Dialect/RTL/Dialect.cpp +++ b/lib/Dialect/RTL/Dialect.cpp @@ -8,7 +8,6 @@ #include "mlir/IR/Builders.h" #include "mlir/IR/DialectImplementation.h" #include "mlir/IR/StandardTypes.h" -#include "llvm/Support/FormatVariadic.h" using namespace circt; using namespace rtl; diff --git a/lib/Dialect/RTL/Types.cpp b/lib/Dialect/RTL/Types.cpp index 81a14ac795..9eeb15d54a 100644 --- a/lib/Dialect/RTL/Types.cpp +++ b/lib/Dialect/RTL/Types.cpp @@ -1,4 +1,4 @@ -//===- Types.cpp - RTL types code defs --------------------------*- C++ -*-===// +//===- Types.cpp - RTL types code defs ------------------------------------===// // // Definitions for RTL data types. Anything which doesn't have to be public // should go in here. @@ -6,10 +6,7 @@ //===----------------------------------------------------------------------===// #include "circt/Dialect/RTL/Types.h" -#include "mlir/IR/Attributes.h" #include "mlir/IR/DialectImplementation.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Hashing.h" #include "llvm/ADT/TypeSwitch.h" using namespace mlir; @@ -22,7 +19,7 @@ Type ArrayType::parse(MLIRContext *ctxt, DialectAsmParser &p) { p.parseType(inner) || p.parseGreater()) return Type(); if (dims.size() != 1) { - p.emitError(p.getNameLoc(), "rtl.array only supports one dimension."); + p.emitError(p.getNameLoc(), "rtl.array only supports one dimension"); return Type(); } return get(ctxt, inner, dims[0]);