[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

Egor Zhdan via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 07:37:27 PDT 2024


================
@@ -527,6 +527,13 @@ class TagTableInfo
       Info.EnumExtensibility =
           static_cast<EnumExtensibilityKind>((Payload & 0x3) - 1);
 
+    uint8_t Copyable =
+        endian::readNext<uint8_t, llvm::endianness::little>(Data);
+    if (Copyable == 1)
+      Info.setSwiftCopyable(std::optional(false));
+    else if (Copyable == 2)
+      Info.setSwiftCopyable(std::optional(true));
----------------
egorzhdan wrote:

Good point! Added the constants.

https://github.com/llvm/llvm-project/pull/90064


More information about the cfe-commits mailing list