================
@@ -266,33 +268,73 @@ void Watchpoint::Dump(Stream *s) const {
 
 // If prefix is nullptr, we display the watch id and ignore the prefix
 // altogether.
-void Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const {
-  if (!prefix) {
-    s->Printf("\nWatchpoint %u hit:", GetID());
-    prefix = "";
-  }
+bool Watchpoint::DumpSnapshots(Stream *s, const char *prefix) const {
+  bool printed_anything = false;
----------------
JDevlieghere wrote:

Doesn't look like you actually need this. You change the value exactly once 
below. I would just return false on line 276 and 337 and true on line 334. I 
think the return value of a `Dump` function is more self explanatory than 
having to scroll up and see if `printed_anything` happened to be modified in 
the 50 lines between 275 and 325. 

https://github.com/llvm/llvm-project/pull/68845
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to