diff options
author | David Tenty <daltenty@ibm.com> | 2024-04-15 13:18:01 -0400 |
---|---|---|
committer | David Tenty <daltenty@ibm.com> | 2024-04-15 13:18:01 -0400 |
commit | 64dc55835a1552dbe74eef79460094014edf659e (patch) | |
tree | b49192ab5c6032e99e7afeaecabdb25d7390eb75 /libcxxabi | |
parent | 9c970d5ecd6a85188cd2b0a941fcd4d60063ef81 (diff) | |
download | llvm-64dc55835a1552dbe74eef79460094014edf659e.zip llvm-64dc55835a1552dbe74eef79460094014edf659e.tar.gz llvm-64dc55835a1552dbe74eef79460094014edf659e.tar.bz2 |
[NFC][libunwind][AIX] Add diagnostic push and TODO
clang treats the cast here as an error since 999d4f840777bf8de26d45947192aa0728edc0fb landed
with -Xextra -Werror. We believe this cast to be safe for the reasons noted in comment, but
we should do some further cleanup at some point.
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/aix_state_tab_eh.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxxabi/src/aix_state_tab_eh.inc b/libcxxabi/src/aix_state_tab_eh.inc index 0cd9483..9f46001 100644 --- a/libcxxabi/src/aix_state_tab_eh.inc +++ b/libcxxabi/src/aix_state_tab_eh.inc @@ -195,8 +195,13 @@ static void invoke_destructor(FSMEntry* fsmEntry, void* addr) { _LIBCXXABI_TRACE_STATETAB0("returned from scalar destructor\n"); } else { _LIBCXXABI_TRACE_STATETAB0("calling vector destructor\n"); + // TODO: in the legacy ABI, destructors had a second argument. We don't expect to encounter + // destructors of this type in the itanium-based ABI, so this should be safe, but this could use some cleanup. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-function-type" __cxa_vec_cleanup(addr, reinterpret_cast<size_t>(fsmEntry->elementCount), fsmEntry->elemSize, reinterpret_cast<destruct_f>(fsmEntry->destructor)); +#pragma GCC diagnostic pop _LIBCXXABI_TRACE_STATETAB0("returned from vector destructor\n"); } } catch (...) { |