This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] BaseToDerived casts
ClosedPublic

Authored by tbaeder on Apr 25 2023, 1:21 AM.

Details

Summary
We can implement these similarly to DerivedToBase casts. We just have to
walk the class hierarchy, sum the base offsets and subtract it from the
current base offset of the pointer.

As a side-effect, this also changes the BaseToDerived casts to only emit one opcode instead of one per base cast.

Diff Detail

Event Timeline

tbaeder created this revision.Apr 25 2023, 1:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 1:21 AM
tbaeder requested review of this revision.Apr 25 2023, 1:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 1:21 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tbaeder updated this revision to Diff 516701.Apr 25 2023, 1:23 AM
Harbormaster completed remote builds in B227950: Diff 516701.
This revision is now accepted and ready to land.Jun 9 2023, 7:15 AM
This revision was landed with ongoing or failed builds.Sep 5 2023, 1:54 AM
This revision was automatically updated to reflect the committed changes.