================ @@ -0,0 +1,116 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, 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 +// +//===----------------------------------------------------------------------===// +// +// This file contains implementation details, such as storage structures, of +// CIR dialect types. +// +//===----------------------------------------------------------------------===// +#ifndef CIR_DIALECT_IR_CIRTYPESDETAILS_H +#define CIR_DIALECT_IR_CIRTYPESDETAILS_H + +#include "mlir/IR/BuiltinAttributes.h" +#include "mlir/Support/LogicalResult.h" +#include "clang/CIR/Dialect/IR/CIRTypes.h" +#include "llvm/ADT/Hashing.h" + +namespace cir { +namespace detail { + +//===----------------------------------------------------------------------===// +// CIR StructTypeStorage +//===----------------------------------------------------------------------===// + +/// Type storage for CIR record types. +struct StructTypeStorage : public mlir::TypeStorage { + struct KeyTy { + llvm::ArrayRef<mlir::Type> members; + mlir::StringAttr name; + bool incomplete; + bool packed; + bool padded; + StructType::RecordKind kind; + + KeyTy(llvm::ArrayRef<mlir::Type> members, mlir::StringAttr name, + bool incomplete, bool packed, bool padded, + StructType::RecordKind kind) + : members(members), name(name), incomplete(incomplete), packed(packed), + padded(padded), kind(kind) {} + }; + + llvm::ArrayRef<mlir::Type> members; + mlir::StringAttr name; + bool incomplete; ---------------- andykaylor wrote:
I can understand that. https://github.com/llvm/llvm-project/pull/135105 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits