[libcxx-commits] [PATCH] D138006: [libc++abi] Refactoring works around __dynamic_cast

Adrian Vogelsgesang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 17 03:06:39 PST 2022


avogelsgesang added a comment.

Here is one of the error messages produced on Apple

  /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/w4-4macminivaultcom-local/llvm-project/libcxx-ci/libcxxabi/src/private_typeinfo.cpp:189:53: error: use of undeclared identifier 'dynamic_type'
                      ", %s.\n", static_type->name(), dynamic_type->name());
                                                      ^
  /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/w4-4macminivaultcom-local/llvm-project/libcxx-ci/libcxxabi/src/private_typeinfo.cpp:191:69: warning: missing field 'dst_ptr_not_leading_to_static_ptr' initializer [-Wmissing-field-initializers]
          info = {dst_type, static_ptr, static_type, src2dst_offset, 0};
                                                                      ^
  /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/w4-4macminivaultcom-local/llvm-project/libcxx-ci/libcxxabi/src/private_typeinfo.cpp:193:9: error: use of undeclared identifier 'dynamic_type'
          dynamic_type->search_above_dst(&info, dynamic_ptr, dynamic_ptr, public_path, true);
          ^
  /Users/libcxx-buildkite-agent/libcxx.buildkite-agent/builds/w4-4macminivaultcom-local/llvm-project/libcxx-ci/libcxxabi/src/private_typeinfo.cpp:286:69: warning: missing field 'dst_ptr_not_leading_to_static_ptr' initializer [-Wmissing-field-initializers]
          info = {dst_type, static_ptr, static_type, src2dst_offset, 0};
                                                                      ^
  2 warnings and 2 errors generated.

It seems your code inside the `_LIBCXXABI_FORGIVING_DYNAMIC_CAST` ifdef is incorrect. This flag is apparently only enabled on Apple


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138006/new/

https://reviews.llvm.org/D138006



More information about the libcxx-commits mailing list