[libcxx-commits] [libcxxabi] 64dc558 - [NFC][libunwind][AIX] Add diagnostic push and TODO
David Tenty via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 15 10:21:56 PDT 2024
Author: David Tenty
Date: 2024-04-15T13:18:01-04:00
New Revision: 64dc55835a1552dbe74eef79460094014edf659e
URL: https://github.com/llvm/llvm-project/commit/64dc55835a1552dbe74eef79460094014edf659e
DIFF: https://github.com/llvm/llvm-project/commit/64dc55835a1552dbe74eef79460094014edf659e.diff
LOG: [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.
Added:
Modified:
libcxxabi/src/aix_state_tab_eh.inc
Removed:
################################################################################
diff --git a/libcxxabi/src/aix_state_tab_eh.inc b/libcxxabi/src/aix_state_tab_eh.inc
index 0cd94834b37adb..9f46001b020906 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 (...) {
More information about the libcxx-commits
mailing list