Page MenuHomePhabricator

[DebugInfo] Tidy up DbgValueLocation class

Authored by Orlando on Feb 5 2020, 7:59 AM.



Mostly NFC. These changes are in preparation for the work done in D74053.

Commit ed29dbaafa49 removed the WasIndirect field from DbgValueLocation so
I've removed some checks that were hanging around and tidied up the class:

  • Fix locNo() method: it no longer needs to work around the WasIndirect bitfield.
  • Remove assertions from constructor: it no longer needs to check the bitfield packing.
  • Use defaulted default constructor and in-class member initializer values.

Diff Detail

Event Timeline

Orlando created this revision.Feb 5 2020, 7:59 AM
Orlando created this object with visibility "No One".
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2020, 7:59 AM
Orlando edited the summary of this revision. (Show Details)Feb 5 2020, 8:21 AM
Orlando added reviewers: vsk, aprantl, bjope, djtodoro.
Orlando changed the visibility from "No One" to "Public (No Login Required)".
Orlando added a project: debug-info.
aprantl added inline comments.Feb 5 2020, 8:48 AM



Without having read the context, this function seems pointless and redundant with the constructor?


why u?

Orlando marked 3 inline comments as done.Feb 5 2020, 9:19 AM
Orlando added inline comments.

I have done this in D74055, another NFC which is dependant on the functional change, to keep this diff smaller because it touches each of the locNo() call sites to update the variable names.


This becomes useful in the next patch D74053 (the functional change).


No particular reason, I am happy to remove it.

aprantl accepted this revision.Feb 5 2020, 4:07 PM
This revision is now accepted and ready to land.Feb 5 2020, 4:07 PM
Orlando abandoned this revision.Feb 7 2020, 4:36 AM
Orlando marked 3 inline comments as done.

Thanks for reviewing this. Unfortunately the changes made in ed29dbaafa49 (D68945) were just reverted in 6531a78ac4b5 so this patch is no longer necessary.