[Lldb-commits] [lldb] [lldb/API] Add setters to SBStructuredData (PR #154445)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 20 12:44:40 PDT 2025
================
@@ -109,6 +109,22 @@ class SBStructuredData {
/// Return the generic pointer if this data structure is a generic type.
lldb::SBScriptObject GetGenericValue() const;
+ void SetValueForKey(const char *key, SBStructuredData &value) const;
----------------
jimingham wrote:
I wasn't suggesting that. I was suggesting doing what you do for all the other "Set" API. If an SBStructuredData was actually a dictionary, and someone calls "SetFloatValue" on it, you don't attempt to merge the new float value with the extant dictionary; instead you discard the dictionary and make the SBStructuredData hold a Float type. Similarly, if I had an SBStructuredData that was an Integer type, and you said "SetValueForKey", I was suggesting you discard the Integer object and make it hold a dictionary with one element, the one passed in to SetValueForKey.
https://github.com/llvm/llvm-project/pull/154445
More information about the lldb-commits
mailing list