[Lldb-commits] [PATCH] D74157: [lldb/API] NFC: Reformat SBThread::GetStopDescription()

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 7 11:03:37 PST 2020


friss added a comment.

I think we're on the same page then.

In D74157#1864543 <https://reviews.llvm.org/D74157#1864543>, @jingham wrote:

> Since StopInfo::GetStopDescription is a virtual method, there's no guarantee that a child of StopInfo will always return a non-empty description, when it has a non-trivial StopReason.  We put in defensive code to try to recover something useful out of that situation, but it would have been better to disallow it, I think.


This commit adds an assert that the description is not empty. I think this is the best way to enforce the contract.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74157





More information about the lldb-commits mailing list