[Lldb-commits] [lldb] [lldb][DWARFIndex][nfc] Factor out fully qualified name query (PR #76977)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 5 09:23:33 PST 2024


================
@@ -102,6 +110,12 @@ class DWARFIndex {
   }
 
   void ReportInvalidDIERef(DIERef ref, llvm::StringRef name) const;
+
+  /// Implementation of `GetFullyQualifiedType` to check a single entry,
+  /// shareable with derived classes.
----------------
clayborg wrote:

> I'm glad you asked, because this API has been driving me crazy 😅 We have to return "true" if we want the "search to keep going" and false if we want the "search to stop", i.e. we found a match. This is what the callbacks are required to do as well.
> 
> If I can get support for that, I'd like to rewrite these APIs to return some kind of enumeration with two names: "KeepGoing", "Stop". Future patch though!

Yes, it would be much clearer in the code if we switched to returning an enum. Something like:
```
enum class IteratorCallbackResult {
  Continue,
  Done
}
```



https://github.com/llvm/llvm-project/pull/76977


More information about the lldb-commits mailing list