[lldb/API] NFC: Reformat and simplify SBThread::GetStopDescription()
authorFred Riss <friss@apple.com>
Thu, 6 Feb 2020 05:47:33 +0000 (21:47 -0800)
committerFred Riss <friss@apple.com>
Tue, 3 Mar 2020 01:43:35 +0000 (17:43 -0800)
commit20ce8affce85ddea069e979a6e79a2c62ca7a0bc
tree756fdb4ac8f6b64b47c26edd0cb7e62f270e1ab3
parentc0a2da9460db7b654e114f03d5cd250bf6e817ef
[lldb/API] NFC: Reformat and simplify SBThread::GetStopDescription()

Summary:
This gets rid of some nesting and of the raw char* variable that caused
the memory management bug we hit recently.

This commit also removes the fallback code which should trigger when
the StopInfo provides no stop description. All currently implemented
StopInfos have a `GetDescription()` method that shouldn't return an
empty description.

Reviewers: JDevlieghere, labath, mib

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D74157
lldb/source/API/SBThread.cpp
lldb/source/Target/Thread.cpp