[Lldb-commits] [PATCH] D33434: Added new API to SBStructuredData class
Abhishek via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 24 08:57:43 PDT 2017
abhishek.aggarwal added a comment.
My comments are inlined. Please let me know if something still needs to be changed.
================
Comment at: include/lldb/API/SBStructuredData.h:60
+ //------------------------------------------------------------------
+ size_t GetSize() const;
+
----------------
clayborg wrote:
> What is the user going to really do when getting the size from a dictionary? I would vote to just make this for arrays and provide a IsEmpty() method if you want to check if the dictionary or array is empty? I am open for reasons why we should be able to get the size of the dictionary if there is a need, I am just thinking out loud here.
I thought of the use case that a user might expect lldb to fill specific number of entries in a dictionary. This might serve as a failure check for the user right in the begining of his code without accessing each (key:value) pair inside it to conclude that enough number of entries are not filled inside the dictionary. I am leaving it as it is for now. However, if you disagree then I will change it according to your proposal.
https://reviews.llvm.org/D33434
More information about the lldb-commits
mailing list