Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Jun 7, 2024
1 parent e987f5e commit d848be2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libcxxabi/src/private_typeinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ void dyn_cast_get_derived_info(derived_object_info* info, const void* static_ptr
reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy;
info->dynamic_type = *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy));
#else
void **vtable = strip_vtable(*static_cast<void ** const *>(static_ptr));
info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
void** vtable = strip_vtable(*static_cast<void** const*>(static_ptr));
info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]);
info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived;
info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]);
#endif
}

Expand Down Expand Up @@ -1512,8 +1512,8 @@ __base_class_type_info::search_above_dst(__dynamic_cast_info* info,
ptrdiff_t offset_to_base = __offset_flags >> __offset_shift;
if (__offset_flags & __virtual_mask)
{
const char* vtable = strip_vtable(*static_cast<const char*const*>(current_ptr));
offset_to_base = update_offset_to_base(vtable, offset_to_base);
const char* vtable = strip_vtable(*static_cast<const char* const*>(current_ptr));
offset_to_base = update_offset_to_base(vtable, offset_to_base);
}
__base_type->search_above_dst(info, dst_ptr,
static_cast<const char*>(current_ptr) + offset_to_base,
Expand All @@ -1532,8 +1532,8 @@ __base_class_type_info::search_below_dst(__dynamic_cast_info* info,
ptrdiff_t offset_to_base = __offset_flags >> __offset_shift;
if (__offset_flags & __virtual_mask)
{
const char* vtable = strip_vtable(*static_cast<const char*const*>(current_ptr));
offset_to_base = update_offset_to_base(vtable, offset_to_base);
const char* vtable = strip_vtable(*static_cast<const char* const*>(current_ptr));
offset_to_base = update_offset_to_base(vtable, offset_to_base);
}
__base_type->search_below_dst(info,
static_cast<const char*>(current_ptr) + offset_to_base,
Expand Down

0 comments on commit d848be2

Please sign in to comment.