[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-09-11 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor marked 4 inline comments as done. teemperor added a comment. (Phabricator didn't send my draft, sorry for the delay). I have more similar patches coming up for the other uses of LazyBool, so I would prefer finishing the implementation in LLDB and then afterwards asking if the ADT folk

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-09-04 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Very nice. LGTM https://reviews.llvm.org/D51557 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-09-03 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor updated this revision to Diff 163741. teemperor marked an inline comment as done. teemperor added a comment. - Now using a typedef instead of a macro. - Using LLVM code style in Lazy.h - Renamed UpdateX to CalculateX https://reviews.llvm.org/D51557 Files: include/lldb/DataFormatters

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-09-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I've been wanting to implement something like this for a long time, so thank you for working on this. :) In https://reviews.llvm.org/D51557#1221273, @zturner wrote: > Also I think it doesn't need to be specific to member variables. We could > just have > > template

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: include/lldb/DataFormatters/ValueObjectPrinter.h:146 + +#define LLDB_VOP ValueObjectPrinter + LazyBoolMember m_should_print; davide wrote: > can you typedef? I feel like using ... = is cleaner Repository: rLLDB LLDB

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. Also I think it doesn't need to be specific to member variables. We could just have template class Lazy { std::function Update; Optional Value; public: LazyValue(std::function Update) : Update(std::move(Update)) {} }; Then, to get the same member fun

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Davide Italiano via Phabricator via lldb-commits
davide added a comment. I agree. Repository: rLLDB LLDB https://reviews.llvm.org/D51557 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. I think we should put this in `llvm/ADT` as it does not seem specific to debugging, and could be useful for others. Repository: rLLDB LLDB https://reviews.llvm.org/D51557 ___ lldb-commits mailing list lldb-commits@lists.

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Davide Italiano via Phabricator via lldb-commits
davide added inline comments. Comment at: include/lldb/DataFormatters/ValueObjectPrinter.h:146 + +#define LLDB_VOP ValueObjectPrinter + LazyBoolMember m_should_print; can you typedef? Repository: rLLDB LLDB https://reviews.llvm.org/D51557 ___

[Lldb-commits] [PATCH] D51557: Replace uses of LazyBool with LazyBool template

2018-08-31 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor created this revision. teemperor added a reviewer: davide. Herald added subscribers: lldb-commits, abidh, JDevlieghere, mgorny. This patch introduces a LazyMember template that allows specifying member variables which values will be computed once they are read the first time. This is s