wallace accepted this revision.
wallace added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/API/SBTraceCursor.cpp:127-131
+double SBTraceCursor::GetWallClockTime() const {
+  LLDB_INSTRUMENT_VA(this);
+
+  const auto &maybe_wall_clock_time = m_opaque_sp->GetWallClockTime();
+  return maybe_wall_clock_time ? *maybe_wall_clock_time : -1.0;
----------------
hawkinsw wrote:
> wallace wrote:
> > we don't have optionals in the SB bridge, so you could do the following
> > 
> >   bool SBTraceCursor::GetWallClockTime(double &time) {
> >     if (const auto &maybe_wall_clock_time = 
> > m_opaque_sp->GetWallClockTime()) {
> >       time = *maybe_wall_clock_time;
> >       return true;
> >     }
> >     return false;
> >   }
> Not that it matters, but *that* was going to be my other suggestion! @wallace 
> is smarter than I am!
<3


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137645/new/

https://reviews.llvm.org/D137645

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to