[libcxx-commits] [libcxxabi] [libc++abi][AIX] Use different function pointer types for destructors with 1 or 2 args (PR #89624)

David Tenty via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 1 08:33:30 PDT 2024


================
@@ -145,8 +143,10 @@ struct FSMEntry {
     intptr_t nextStatePtr;
   };
   union {
-    // Address of the destructor function.
-    void (*destructor)(void*, size_t);
+    // Address of the destructor function with 1 argument.
+    void (*destructor)(void*);
+    // Address of the destructor function with 2 arguments.
+    void (*destructor2)(void*, size_t);
----------------
daltenty wrote:

I would give this a more descriptive name:
```suggestion
    void (*xlC_destructor)(void*, size_t);
```
alternative name bikeshed:

- legacy_destructor
- xlcxxabi_destructor
- xl_destructor

etc.


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


More information about the libcxx-commits mailing list