Skip to content

Commit 67e3055

Browse files
committed
[lldb] Minor fixups for Part 2 of 2 CommandObject::DoExecute(...)
1 parent acbc187 commit 67e3055

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

lldb/source/Commands/CommandObjectHealthcheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ CommandObjectHealthcheck::CommandObjectHealthcheck(
3030
"failures in the debugger. The command is meant to be run after a "
3131
"expression evaluator failure has occurred.") {}
3232

33-
bool CommandObjectHealthcheck::DoExecute(Args &args,
33+
void CommandObjectHealthcheck::DoExecute(Args &args,
3434
CommandReturnObject &result) {
3535
std::error_code err;
3636
llvm::SmallString<128> temp_path;
@@ -47,7 +47,7 @@ bool CommandObjectHealthcheck::DoExecute(Args &args,
4747
if (temp_fd == -1) {
4848
result.AppendErrorWithFormat("could not write to temp file %s",
4949
err.message().c_str());
50-
return false;
50+
return;
5151
}
5252

5353
llvm::raw_fd_ostream temp_stream(temp_fd, true, true);
@@ -65,9 +65,8 @@ bool CommandObjectHealthcheck::DoExecute(Args &args,
6565
Host::IsInteractiveGraphicSession()) {
6666
if (llvm::Error err =
6767
Host::OpenFileInExternalEditor("", FileSpec(temp_path), 0))
68-
return false;
68+
return;
6969
}
7070
#endif
7171

72-
return true;
7372
}

lldb/source/Commands/CommandObjectHealthcheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CommandObjectHealthcheck : public CommandObjectParsed {
2020
~CommandObjectHealthcheck() override = default;
2121

2222
protected:
23-
bool DoExecute(Args &args, CommandReturnObject &result) override;
23+
void DoExecute(Args &args, CommandReturnObject &result) override;
2424
};
2525

2626
} // namespace lldb_private

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ class CommandObjectSwift_Demangle : public CommandObjectParsed {
21702170
};
21712171

21722172
protected:
2173-
bool DoExecute(Args &command, CommandReturnObject &result) override {
2173+
void DoExecute(Args &command, CommandReturnObject &result) override {
21742174
for (size_t i = 0; i < command.GetArgumentCount(); i++) {
21752175
StringRef name = command.GetArgumentAtIndex(i);
21762176
if (!name.empty()) {
@@ -2195,7 +2195,6 @@ class CommandObjectSwift_Demangle : public CommandObjectParsed {
21952195
}
21962196
}
21972197
result.SetStatus(lldb::eReturnStatusSuccessFinishResult);
2198-
return true;
21992198
}
22002199

22012200
CommandOptions m_options;
@@ -2259,7 +2258,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22592258
}
22602259

22612260
protected:
2262-
bool DoExecute(llvm::StringRef command,
2261+
void DoExecute(llvm::StringRef command,
22632262
CommandReturnObject &result) override {
22642263
StackFrameSP frame_sp(m_exe_ctx.GetFrameSP());
22652264
EvaluateExpressionOptions options;
@@ -2278,7 +2277,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22782277
result.SetStatus(lldb::eReturnStatusFailed);
22792278
if (result_valobj_sp && result_valobj_sp->GetError().Fail())
22802279
result.AppendError(result_valobj_sp->GetError().AsCString());
2281-
return false;
2280+
return;
22822281
}
22832282

22842283
// At this point, we're sure we're grabbing in our hands a valid
@@ -2291,7 +2290,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22912290
if (!(result_type.GetTypeInfo() & lldb::eTypeInstanceIsPointer)) {
22922291
result.AppendError("refcount only available for class types");
22932292
result.SetStatus(lldb::eReturnStatusFailed);
2294-
return false;
2293+
return;
22952294
}
22962295

22972296
// Ask swift debugger support in the compiler about the objects
@@ -2311,7 +2310,6 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
23112310
unowned ? std::to_string(*unowned).c_str() : unavailable.c_str(),
23122311
weak ? std::to_string(*weak).c_str() : unavailable.c_str());
23132312
result.SetStatus(lldb::eReturnStatusSuccessFinishResult);
2314-
return true;
23152313
}
23162314
};
23172315

0 commit comments

Comments
 (0)