[Lldb-commits] [PATCH] D61921: [Target] Generalize language-specific behavior in ThreadPlanStepThrough

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 15 00:24:35 PDT 2019


labath added a comment.

If this iteration is going to be used a lot, I'd recommend taking a bit of time to implement an iterator abstraction over the language runtimes. It takes a bit longer to set up, but I hope we can all agree that `for (runtime: process->GetLanguageRuntimes()) runtime->foo();` is more readable than `process->ForEachLanguageRuntime([] (runtime) { runtime->foo(); })`. This is particularly true if you need some sort of a control flow construct (`continue`, `break`, `return`) in the loop "body".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61921/new/

https://reviews.llvm.org/D61921





More information about the lldb-commits mailing list