This is an archive of the discontinued LLVM Phabricator instance.

Fix ValueObject::GetAddressOf for subclasses using ValueObjectConstResultImpl backends
AcceptedPublic

Authored by jingham on Dec 8 2022, 2:32 PM.

Details

Summary

The original code always set the m_live_address of children of the ValueObjects that
use ValueObjectConstResultImpl backends to the parent m_live_address + child_byte_offset.
That is correct for structure types, but wrong for pointer types, since m_live_address
for a pointer type is the address of the storage for the pointer, not of the pointee.

Also added a test which was failing before this patch.

Diff Detail

Event Timeline

jingham created this revision.Dec 8 2022, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 2:32 PM
jingham requested review of this revision.Dec 8 2022, 2:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 2:32 PM
This revision is now accepted and ready to land.Dec 9 2022, 3:19 AM