[libcxx-commits] [PATCH] D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI
Roland McGrath via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 8 16:27:39 PDT 2020
mcgrathr added inline comments.
================
Comment at: libcxxabi/src/private_typeinfo.cpp:621
+ // bytes after the start of the vtable (4 for the offset from top + 4 for the typeinfo component).
+ uint32_t* vtable = *reinterpret_cast<uint32_t* const*>(static_ptr);
+ uint32_t offset_to_derived = vtable[-2];
----------------
I think this should be `const uint32_t* ...` and `<const uint32_t* const*>`.
================
Comment at: libcxxabi/src/private_typeinfo.cpp:627
+ int32_t offset_to_ti_proxy = static_cast<int32_t>(vtable[-1]);
+ uint8_t* ptr_to_ti_proxy =
+ reinterpret_cast<uint8_t*>(vtable) + offset_to_ti_proxy;
----------------
This should also be pointer to const.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77606/new/
https://reviews.llvm.org/D77606
More information about the libcxx-commits
mailing list