[Lldb-commits] [PATCH] D37923: Implement interactive command interruption
Leonard Mosescu via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 19 11:28:09 PDT 2017
This looks beautiful indeed. The problem is that it doesn't quite work with
the current MemoryBuffer and the line_iterator : for one thing there's no
way to construct a MemoryBuffer from a StringRef, or to use the
line_iterator directly with a StringRef.
On Tue, Sep 19, 2017 at 10:39 AM, Zachary Turner via Phabricator <
reviews at reviews.llvm.org> wrote:
> zturner added a comment.
>
> Give me a few more hours, if there's a way to make this work with
> `line_iterator` I'd really prefer that since I think it improves
> readability. Can you confirm that if you were able to write:
>
> auto begin = line_iterator(str, /* skip_empty_lines =*/ false);
> auto end = line_iterator();
> while (begin != end && !WasInterrupted()) {
> stream.Write(*begin);
> if (++begin != end)
> stream.Write("\n");
> }
>
> That this would be equivalent?
>
>
> https://reviews.llvm.org/D37923
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170919/d7a905e9/attachment.html>
More information about the lldb-commits
mailing list