@@ -678,14 +678,21 @@ class TagInfo : public CommonTypeInfo {
678678 LLVM_PREFERRED_TYPE (bool )
679679 unsigned IsFlagEnum : 1 ;
680680
681+ LLVM_PREFERRED_TYPE (bool )
682+ unsigned SwiftCopyableSpecified : 1 ;
683+ LLVM_PREFERRED_TYPE (bool )
684+ unsigned SwiftCopyable : 1 ;
685+
681686public:
682687 std::optional<std::string> SwiftImportAs;
683688 std::optional<std::string> SwiftRetainOp;
684689 std::optional<std::string> SwiftReleaseOp;
685690
686691 std::optional<EnumExtensibilityKind> EnumExtensibility;
687692
688- TagInfo () : HasFlagEnum(0 ), IsFlagEnum(0 ) {}
693+ TagInfo ()
694+ : HasFlagEnum(0 ), IsFlagEnum(0 ), SwiftCopyableSpecified(false ),
695+ SwiftCopyable (false ) {}
689696
690697 std::optional<bool > isFlagEnum () const {
691698 if (HasFlagEnum)
@@ -697,6 +704,15 @@ class TagInfo : public CommonTypeInfo {
697704 IsFlagEnum = Value.value_or (false );
698705 }
699706
707+ std::optional<bool > isSwiftCopyable () const {
708+ return SwiftCopyableSpecified ? std::optional<bool >(SwiftCopyable)
709+ : std::nullopt ;
710+ }
711+ void setSwiftCopyable (std::optional<bool > Value) {
712+ SwiftCopyableSpecified = Value.has_value ();
713+ SwiftCopyable = Value.value_or (false );
714+ }
715+
700716 TagInfo &operator |=(const TagInfo &RHS) {
701717 static_cast <CommonTypeInfo &>(*this ) |= RHS;
702718
@@ -713,6 +729,9 @@ class TagInfo : public CommonTypeInfo {
713729 if (!EnumExtensibility)
714730 EnumExtensibility = RHS.EnumExtensibility ;
715731
732+ if (!SwiftCopyableSpecified)
733+ setSwiftCopyable (RHS.isSwiftCopyable ());
734+
716735 return *this ;
717736 }
718737
@@ -727,6 +746,7 @@ inline bool operator==(const TagInfo &LHS, const TagInfo &RHS) {
727746 LHS.SwiftRetainOp == RHS.SwiftRetainOp &&
728747 LHS.SwiftReleaseOp == RHS.SwiftReleaseOp &&
729748 LHS.isFlagEnum () == RHS.isFlagEnum () &&
749+ LHS.isSwiftCopyable () == RHS.isSwiftCopyable () &&
730750 LHS.EnumExtensibility == RHS.EnumExtensibility ;
731751}
732752
0 commit comments