This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFC] Allow range-based for-loops on VariableList
ClosedPublic

Authored by teemperor on Nov 25 2019, 5:34 AM.

Details

Summary

Adds support for doing range-based for-loops on LLDB's VariableList and
modernises all the index-based for-loops in LLDB where possible.

Diff Detail

Event Timeline

teemperor created this revision.Nov 25 2019, 5:34 AM
Herald added a project: Restricted Project. · View Herald Transcript
labath accepted this revision.Nov 25 2019, 5:41 AM

Since copying shared pointers isn't completely cheap, I think we should use const shared_ptr &s whereever possible. Also, the typical lldb naming convention for shared_pointer variables is to have them end in _sp, so I'd try to preserve that.
Besides that, LGTM.

This revision is now accepted and ready to land.Nov 25 2019, 5:41 AM
teemperor updated this revision to Diff 230888.Nov 25 2019, 6:03 AM
  • Added _sp suffix to variable names.
  • Using const-references where possible.
This revision was automatically updated to reflect the committed changes.