[Lldb-commits] [lldb] [lldb/API] Add setters to SBStructuredData (PR #154445)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 21 10:04:06 PDT 2025
================
@@ -81,6 +81,39 @@ class StructuredDataImpl {
void SetObjectSP(const StructuredData::ObjectSP &obj) { m_data_sp = obj; }
+ void SetValueForKey(llvm::StringRef key,
+ const StructuredData::ObjectSP &value) {
+ if (m_data_sp) {
+ if (StructuredData::Dictionary *dict = m_data_sp->GetAsDictionary())
+ return dict->AddItem(key, value);
----------------
jimingham wrote:
It looks confusing to seem to return a value here. In the end, it works because AddItem is also a void return. But it looks really weird.
https://github.com/llvm/llvm-project/pull/154445
More information about the lldb-commits
mailing list