Skip to content

Commit 0596a45

Browse files
[lldb] Minor fixups for Part 2 of 2 CommandObject::DoExecute(...) (#8362)
(cherry-picked from commit 67e3055) Co-authored-by: Pete Lawrence <[email protected]>
1 parent 3958e98 commit 0596a45

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
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);
@@ -64,9 +64,8 @@ bool CommandObjectHealthcheck::DoExecute(Args &args,
6464
Host::IsInteractiveGraphicSession()) {
6565
if (llvm::Error err =
6666
Host::OpenFileInExternalEditor("", FileSpec(temp_path), 0))
67-
return false;
67+
return;
6868
}
6969
#endif
7070

71-
return true;
7271
}

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

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

21792179
protected:
2180-
bool DoExecute(Args &command, CommandReturnObject &result) override {
2180+
void DoExecute(Args &command, CommandReturnObject &result) override {
21812181
for (size_t i = 0; i < command.GetArgumentCount(); i++) {
21822182
StringRef name = command.GetArgumentAtIndex(i);
21832183
if (!name.empty()) {
@@ -2202,7 +2202,6 @@ class CommandObjectSwift_Demangle : public CommandObjectParsed {
22022202
}
22032203
}
22042204
result.SetStatus(lldb::eReturnStatusSuccessFinishResult);
2205-
return true;
22062205
}
22072206

22082207
CommandOptions m_options;
@@ -2266,7 +2265,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22662265
}
22672266

22682267
protected:
2269-
bool DoExecute(llvm::StringRef command,
2268+
void DoExecute(llvm::StringRef command,
22702269
CommandReturnObject &result) override {
22712270
StackFrameSP frame_sp(m_exe_ctx.GetFrameSP());
22722271
EvaluateExpressionOptions options;
@@ -2285,7 +2284,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22852284
result.SetStatus(lldb::eReturnStatusFailed);
22862285
if (result_valobj_sp && result_valobj_sp->GetError().Fail())
22872286
result.AppendError(result_valobj_sp->GetError().AsCString());
2288-
return false;
2287+
return;
22892288
}
22902289

22912290
// At this point, we're sure we're grabbing in our hands a valid
@@ -2298,7 +2297,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
22982297
if (!(result_type.GetTypeInfo() & lldb::eTypeInstanceIsPointer)) {
22992298
result.AppendError("refcount only available for class types");
23002299
result.SetStatus(lldb::eReturnStatusFailed);
2301-
return false;
2300+
return;
23022301
}
23032302

23042303
// Ask swift debugger support in the compiler about the objects
@@ -2318,7 +2317,6 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
23182317
unowned ? std::to_string(*unowned).c_str() : unavailable.c_str(),
23192318
weak ? std::to_string(*weak).c_str() : unavailable.c_str());
23202319
result.SetStatus(lldb::eReturnStatusSuccessFinishResult);
2321-
return true;
23222320
}
23232321
};
23242322

0 commit comments

Comments
 (0)