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
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
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
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
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
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
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
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.
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
___
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
10 matches
Mail list logo