This is an archive of the discontinued LLVM Phabricator instance.

Remove DWARFExpression::LocationListSize
ClosedPublic

Authored by labath on Aug 27 2019, 1:33 AM.

Details

Summary

The only reason for this function's existance is so that we could pass
the correct size into the DWARFExpression constructor. However, there is
no harm in passing the entire data extractor into the DWARFExpression,
since the same code is performing the size determination as well as the
subsequent parse. So, if we get malformed input or there's a bug in the
parser, we'd compute the wrong size anyway.

Additionally, reducing the number of entry points into the location list
parsing machinery makes it easier to switch the llvm debug_loc(lists)
parsers.

While inside, I added a couple of tests for invalid location list
handling.

Event Timeline

labath created this revision.Aug 27 2019, 1:33 AM
JDevlieghere accepted this revision.Aug 27 2019, 8:31 AM

Thanks, Pavel!

This revision is now accepted and ready to land.Aug 27 2019, 8:31 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2019, 8:25 AM