================
@@ -100,6 +100,19 @@ SBSaveCoreOptions::AddMemoryRegionToSave(const
SBMemoryRegionInfo ®ion) {
return SBError();
}
+uint32_t lldb::SBSaveCoreOptions::GetNumThreads() const {
+ LLDB_INSTRUMENT_VA(this);
+ return m_opaque_up->GetNumThreads();
+}
+
+SBThread SBSaveCoreOptions::GetThreadAtIndex(uint32_t idx) const {
+ LLDB_INSTRUMENT_VA(this, idx);
+ std::optional<lldb::ThreadSP> thread_sp = m_opaque_up->GetThreadAtIndex(idx);
+ if (thread_sp)
+ return SBThread(thread_sp.value());
+ return SBThread();
----------------
clayborg wrote:
If we remove the optional as suggested above, this can just be:
```
return SBThread(m_opaque_up->GetThreadAtIndex(idx));
```
https://github.com/llvm/llvm-project/pull/122541
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits