[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 09:17:04 PST 2024


================
@@ -589,10 +589,16 @@ class TagTableInfo
 
     uint8_t Copyable =
         endian::readNext<uint8_t, llvm::endianness::little>(Data);
-    if (Copyable == kSwiftNonCopyable)
+    if (Copyable == kSwiftDoesNotConform)
       Info.setSwiftCopyable(std::optional(false));
-    else if (Copyable == kSwiftCopyable)
+    else if (Copyable == kSwiftConforms)
       Info.setSwiftCopyable(std::optional(true));
+    uint8_t Escapable =
+        endian::readNext<uint8_t, llvm::endianness::little>(Data);
+    if (Escapable == kSwiftDoesNotConform)
+      Info.setSwiftEscapable(std::optional(false));
+    else if (Escapable == kSwiftConforms)
+      Info.setSwiftEscapable(std::optional(true));
----------------
compnerd wrote:

```suggestion
    if (Escapable == kSwiftConforms || Escapable == kSwiftDoesNotConform)
      Info.setSwiftEscapable(std::optional(Escapable == kSwiftConforms));
```

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


More information about the cfe-commits mailing list