This is an archive of the discontinued LLVM Phabricator instance.

[DWARFLinker] Set size of location expression of DW_FORM_block1 properly.
ClosedPublic

Authored by avl on May 24 2023, 9:59 AM.

Details

Summary

This patch fixes the problem introduced by D147066. As D147066 may change
the contents of location expression, it started to calculate final attribute
size. This patch uses more correct way to calculate size: DIEValue::sizeOf().

Diff Detail

Event Timeline

avl created this revision.May 24 2023, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 9:59 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
avl requested review of this revision.May 24 2023, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 9:59 AM
JDevlieghere accepted this revision.May 24 2023, 4:39 PM

LGTM

llvm/lib/DWARFLinker/DWARFLinker.cpp
1313–1315
This revision is now accepted and ready to land.May 24 2023, 4:39 PM
avl updated this revision to Diff 525489.May 25 2023, 2:07 AM

rebased.

avl updated this revision to Diff 525532.May 25 2023, 3:58 AM

rebased.

avl added a comment.May 25 2023, 5:14 AM

Thank you for the review!