Page MenuHomePhabricator

[lldb-mi] Clean up CMICmdArgSet usage.

Authored by brucem on Sep 15 2015, 2:22 AM.



CMICmdArgSet stores a vector of non-const pointers to the arguments
that it is validating. It owns them and is responsible for deleting

We don't need to pass a const reference to the argument to
CMICmdArgSet::Add and then take the address and const_cast it
when we can just pass the argument pointer in directly.

This lets us remove some noise at every call site for CMICmdArgSet::Add
and then clean up a couple of bits inside CMICmdArgSet to remove

Diff Detail


Event Timeline

brucem updated this revision to Diff 34790.Sep 15 2015, 2:22 AM
brucem retitled this revision from to [lldb-mi] Clean up CMICmdArgSet usage..
brucem updated this object.
brucem added reviewers: abidh, ki.stfu, domipheus.
brucem added a subscriber: lldb-commits.

This could be cleaner still, but this is a good first pass and removes the worst of it.

92 ↗(On Diff #34790)

Should this say something other than (R) here?

ki.stfu accepted this revision.Sep 15 2015, 3:55 AM
ki.stfu edited edge metadata.


92 ↗(On Diff #34790)

This comment is useless, and for me it looks like an attempt to write something to follow the coding style. FMPOV, we should remove all comments like that, and move others to corresponding .h files.

This revision is now accepted and ready to land.Sep 15 2015, 3:55 AM
brucem added inline comments.Sep 15 2015, 4:48 AM
92 ↗(On Diff #34790)

If / when that move happens, we should also move to Doxygen syntax.

This revision was automatically updated to reflect the committed changes.