[Lldb-commits] [lldb] [LLDB] Make the thread list for SBSaveCoreOptions iterable (PR #122541)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 10 15:01:28 PST 2025


================
@@ -47,6 +46,9 @@ class SaveCoreOptions {
 
   void AddMemoryRegionToSave(const lldb_private::MemoryRegionInfo &region);
 
+  std::optional<lldb::ThreadSP> GetThreadAtIndex(uint32_t idx) const;
----------------
clayborg wrote:

We don't need optional if `lldb::ThreadSP` is what is returned, just return a `lldb::ThreadSP` and that can be checked for being invalid. There is no case where we want a valid optional with an empty `lldb::ThreadSP`.

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


More information about the lldb-commits mailing list