Skip to content

Commit f4418fb

Browse files
Merge pull request #10483 from swiftlang/revert-10474-rdar148769820
Revert "[lldb] Customize the statusline for the Swift REPL"
2 parents ce18439 + 6b226af commit f4418fb

File tree

7 files changed

+3
-88
lines changed

7 files changed

+3
-88
lines changed

lldb/include/lldb/Core/Debugger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
311311
bool GetShowStatusline() const;
312312

313313
const FormatEntity::Entry *GetStatuslineFormat() const;
314-
bool SetStatuslineFormat(const FormatEntity::Entry &format);
315314

316315
llvm::StringRef GetShowProgressAnsiPrefix() const;
317316

lldb/include/lldb/Interpreter/OptionValue.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class OptionValue {
7272
virtual ~OptionValue() = default;
7373

7474
OptionValue(const OptionValue &other);
75-
75+
7676
OptionValue& operator=(const OptionValue &other);
7777

7878
// Subclasses should override these functions
@@ -330,10 +330,6 @@ class OptionValue {
330330

331331
bool SetValueAs(ArchSpec v) { return SetArchSpecValue(v); }
332332

333-
bool SetValueAs(const FormatEntity::Entry &v) {
334-
return SetFormatEntityValue(v);
335-
}
336-
337333
template <typename T, std::enable_if_t<std::is_enum_v<T>, bool> = true>
338334
bool SetValueAs(T t) {
339335
return SetEnumerationValue(t);
@@ -391,10 +387,8 @@ class OptionValue {
391387
bool SetUUIDValue(const UUID &uuid);
392388

393389
const FormatEntity::Entry *GetFormatEntity() const;
394-
bool SetFormatEntityValue(const FormatEntity::Entry &entry);
395-
396390
const RegularExpression *GetRegexValue() const;
397-
391+
398392
mutable std::mutex m_mutex;
399393
};
400394

lldb/source/Core/Debugger.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,6 @@ const FormatEntity::Entry *Debugger::GetStatuslineFormat() const {
481481
return GetPropertyAtIndexAs<const FormatEntity::Entry *>(idx);
482482
}
483483

484-
bool Debugger::SetStatuslineFormat(const FormatEntity::Entry &format) {
485-
constexpr uint32_t idx = ePropertyStatuslineFormat;
486-
bool ret = SetPropertyAtIndex(idx, format);
487-
RedrawStatusline();
488-
return ret;
489-
}
490-
491484
bool Debugger::GetUseAutosuggestion() const {
492485
const uint32_t idx = ePropertyShowAutosuggestion;
493486
return GetPropertyAtIndexAs<bool>(

lldb/source/Interpreter/OptionValue.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,6 @@ bool OptionValue::SetArchSpecValue(ArchSpec arch_spec) {
474474
return false;
475475
}
476476

477-
bool OptionValue::SetFormatEntityValue(const FormatEntity::Entry &entry) {
478-
std::lock_guard<std::mutex> lock(m_mutex);
479-
if (OptionValueFormatEntity *option_value = GetAsFormatEntity()) {
480-
option_value->SetCurrentValue(entry);
481-
return true;
482-
}
483-
return false;
484-
}
485-
486477
const char *OptionValue::GetBuiltinTypeAsCString(Type t) {
487478
switch (t) {
488479
case eTypeInvalid:

lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,7 @@ Status SwiftREPL::DoInitialization() {
303303
std::static_pointer_cast<TypeSystemSwiftTypeRefForExpressions>(
304304
*type_system_or_err)
305305
->SetCompilerOptions(m_compiler_options.c_str());
306-
307-
std::string format_str = "${ansi.negative}Swift " +
308-
swift::version::getCompilerVersion() +
309-
"{ | {${progress.count} }${progress.message}}";
310-
FormatEntity::Entry format_entry;
311-
Status error = FormatEntity::Parse(format_str, format_entry);
312-
if (error.Success())
313-
m_target.GetDebugger().SetStatuslineFormat(format_entry);
314-
315-
return error;
306+
return Status();
316307
}
317308

318309
llvm::StringRef SwiftREPL::GetSourceFileBasename() {

lldb/unittests/Core/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
add_lldb_unittest(LLDBCoreTests
2-
DebuggerTest.cpp
32
CommunicationTest.cpp
43
DiagnosticEventTest.cpp
54
DumpDataExtractorTest.cpp

lldb/unittests/Core/DebuggerTest.cpp

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)