summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-02-13 06:25:41 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-02-13 06:25:41 +0000
commitd5b440369dbb0d41e6ecd47d6ac7410201e27f17 (patch)
tree4dc2e3c44bcd3e14143715fa86584862b2290f9f /lldb/source/Commands/CommandObjectCommands.cpp
parent5cf777e41387c84518a9ff2ec1222058daf54e58 (diff)
downloadbcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.tar.gz
bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.zip
Replace 'ap' with 'up' suffix in variable names. (NFC)
The `ap` suffix is a remnant of lldb's former use of auto pointers, before they got deprecated. Although all their uses were replaced by unique pointers, some variables still carried the suffix. In r353795 I removed another auto_ptr remnant, namely redundant calls to ::get for unique_pointers. Jim justly noted that this is a good opportunity to clean up the variable names as well. I went over all the changes to ensure my find-and-replace didn't have any undesired side-effects. I hope I didn't miss any, but if you end up at this commit doing a git blame on a weirdly named variable, please know that the change was unintentional. llvm-svn: 353912
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index adce7471794..df6ec6492d7 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -890,11 +890,11 @@ protected:
auto command_name = args[0].ref;
if (!m_interpreter.CommandExists(command_name)) {
StreamString error_msg_stream;
- const bool generate_apropos = true;
+ const bool generate_upropos = true;
const bool generate_type_lookup = false;
CommandObjectHelp::GenerateAdditionalHelpAvenuesMessage(
&error_msg_stream, command_name, llvm::StringRef(), llvm::StringRef(),
- generate_apropos, generate_type_lookup);
+ generate_upropos, generate_type_lookup);
result.AppendError(error_msg_stream.GetString());
result.SetStatus(eReturnStatusFailed);
return false;
@@ -988,7 +988,7 @@ protected:
void IOHandlerInputComplete(IOHandler &io_handler,
std::string &data) override {
io_handler.SetIsDone(true);
- if (m_regex_cmd_ap) {
+ if (m_regex_cmd_up) {
StringList lines;
if (lines.SplitIntoLines(data)) {
const size_t num_lines = lines.GetSize();
@@ -1007,8 +1007,8 @@ protected:
}
}
}
- if (m_regex_cmd_ap->HasRegexEntries()) {
- CommandObjectSP cmd_sp(m_regex_cmd_ap.release());
+ if (m_regex_cmd_up->HasRegexEntries()) {
+ CommandObjectSP cmd_sp(m_regex_cmd_up.release());
m_interpreter.AddCommand(cmd_sp->GetCommandName(), cmd_sp, true);
}
}
@@ -1025,7 +1025,7 @@ protected:
Status error;
auto name = command[0].ref;
- m_regex_cmd_ap = llvm::make_unique<CommandObjectRegexCommand>(
+ m_regex_cmd_up = llvm::make_unique<CommandObjectRegexCommand>(
m_interpreter, name, m_options.GetHelp(), m_options.GetSyntax(), 10, 0,
true);
@@ -1070,7 +1070,7 @@ protected:
bool check_only) {
Status error;
- if (!m_regex_cmd_ap) {
+ if (!m_regex_cmd_up) {
error.SetErrorStringWithFormat(
"invalid regular expression command object for: '%.*s'",
(int)regex_sed.size(), regex_sed.data());
@@ -1156,22 +1156,22 @@ protected:
std::string subst(regex_sed.substr(second_separator_char_pos + 1,
third_separator_char_pos -
second_separator_char_pos - 1));
- m_regex_cmd_ap->AddRegexCommand(regex.c_str(), subst.c_str());
+ m_regex_cmd_up->AddRegexCommand(regex.c_str(), subst.c_str());
}
return error;
}
void AddRegexCommandToInterpreter() {
- if (m_regex_cmd_ap) {
- if (m_regex_cmd_ap->HasRegexEntries()) {
- CommandObjectSP cmd_sp(m_regex_cmd_ap.release());
+ if (m_regex_cmd_up) {
+ if (m_regex_cmd_up->HasRegexEntries()) {
+ CommandObjectSP cmd_sp(m_regex_cmd_up.release());
m_interpreter.AddCommand(cmd_sp->GetCommandName(), cmd_sp, true);
}
}
}
private:
- std::unique_ptr<CommandObjectRegexCommand> m_regex_cmd_ap;
+ std::unique_ptr<CommandObjectRegexCommand> m_regex_cmd_up;
class CommandOptions : public Options {
public:
OpenPOWER on IntegriCloud