[Lldb-commits] [PATCH] D48351: Move dumping code out of RegisterValue class
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 19 10:22:08 PDT 2018
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.
I don't agree that moving dump routines away from the class that they are dumping is a good idea in general. It makes it harder for somebody new to the code to find out how to print out the objects, which is often handy in development as well as for logging and the like. OTOH, it seems like in this case the motivation (RegisterValue is useful on the server side so its reducing its dependencies is desirable) outweighs these downsides.
If this pattern becomes more common, then we have to deal with how somebody would find these dump routines. If RegisterValue gets moved out of Core, would you really look to a file in Core for the dump routine, especially as many other classes have an obvious Dump method?
But this change is well motivated, so as a one-off this is okay.
More information about the lldb-commits