Skip to content

[lldb] Minor fixups for Part 2 of 2 CommandObject::DoExecute(...) #8362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lldb/source/Commands/CommandObjectHealthcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CommandObjectHealthcheck::CommandObjectHealthcheck(
"failures in the debugger. The command is meant to be run after a "
"expression evaluator failure has occurred.") {}

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

llvm::raw_fd_ostream temp_stream(temp_fd, true, true);
Expand All @@ -64,9 +64,8 @@ bool CommandObjectHealthcheck::DoExecute(Args &args,
Host::IsInteractiveGraphicSession()) {
if (llvm::Error err =
Host::OpenFileInExternalEditor("", FileSpec(temp_path), 0))
return false;
return;
}
#endif

return true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,7 @@ class CommandObjectSwift_Demangle : public CommandObjectParsed {
};

protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
void DoExecute(Args &command, CommandReturnObject &result) override {
for (size_t i = 0; i < command.GetArgumentCount(); i++) {
StringRef name = command.GetArgumentAtIndex(i);
if (!name.empty()) {
Expand All @@ -2202,7 +2202,6 @@ class CommandObjectSwift_Demangle : public CommandObjectParsed {
}
}
result.SetStatus(lldb::eReturnStatusSuccessFinishResult);
return true;
}

CommandOptions m_options;
Expand Down Expand Up @@ -2266,7 +2265,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
}

protected:
bool DoExecute(llvm::StringRef command,
void DoExecute(llvm::StringRef command,
CommandReturnObject &result) override {
StackFrameSP frame_sp(m_exe_ctx.GetFrameSP());
EvaluateExpressionOptions options;
Expand All @@ -2285,7 +2284,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
result.SetStatus(lldb::eReturnStatusFailed);
if (result_valobj_sp && result_valobj_sp->GetError().Fail())
result.AppendError(result_valobj_sp->GetError().AsCString());
return false;
return;
}

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

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

Expand Down