================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to