This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Make DIEDelta::SizeOf() more explicit. NFCI.
ClosedPublic

Authored by ikudrin on Jul 18 2020, 4:43 AM.

Details

Summary

The patch restricts DIEDelta::SizeOf() to accept only DWARF forms that are actually used in the LLVM codebase. This should make the use of the class more explicit and help to avoid issues similar to fixed in D83958 and D84094.

Diff Detail

Event Timeline

ikudrin created this revision.Jul 18 2020, 4:43 AM
dblaikie accepted this revision.Jul 20 2020, 2:30 PM

Sounds good - thanks!

(I'm of slightly mixed feelings about this sort of overly narrowing of contracts if some code can reasonably be agnostic/general without a great deal of work - but they're easy enough to widen again if/when needed I suppose)

This revision is now accepted and ready to land.Jul 20 2020, 2:30 PM
This revision was automatically updated to reflect the committed changes.