Index: flang/include/flang/Optimizer/Dialect/FIRType.h =================================================================== --- flang/include/flang/Optimizer/Dialect/FIRType.h +++ flang/include/flang/Optimizer/Dialect/FIRType.h @@ -22,6 +22,11 @@ class FIROpsDialect; class KindMapping; using KindTy = unsigned; + +namespace detail { +struct RecordTypeStorage; +} // namespace detail + } // namespace fir //===----------------------------------------------------------------------===// Index: mlir/include/mlir/IR/BuiltinAttributes.h =================================================================== --- mlir/include/mlir/IR/BuiltinAttributes.h +++ mlir/include/mlir/IR/BuiltinAttributes.h @@ -31,6 +31,12 @@ class Operation; class RankedTensorType; +namespace detail { +struct DenseIntOrFPElementsAttrStorage; +struct DenseStringElementsAttrStorage; +struct StringAttrStorage; +} // namespace detail + //===----------------------------------------------------------------------===// // Elements Attributes //===----------------------------------------------------------------------===// Index: mlir/include/mlir/IR/BuiltinTypes.h =================================================================== --- mlir/include/mlir/IR/BuiltinTypes.h +++ mlir/include/mlir/IR/BuiltinTypes.h @@ -32,6 +32,12 @@ class StringAttr; class TypeRange; +namespace detail { +struct FunctionTypeStorage; +struct IntegerTypeStorage; +struct TupleTypeStorage; +} // namespace detail + //===----------------------------------------------------------------------===// // FloatType //===----------------------------------------------------------------------===// Index: mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp =================================================================== --- mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp +++ mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp @@ -67,7 +67,7 @@ DefGen(const AttrOrTypeDef &def); void emitDecl(raw_ostream &os) const { - if (storageCls) { + if (storageCls && def.genStorageClass()) { NamespaceEmitter ns(os, def.getStorageNamespace()); os << "struct " << def.getStorageClassName() << ";\n"; }