summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python
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/Plugins/ScriptInterpreter/Python
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/Plugins/ScriptInterpreter/Python')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 294c4b005d8..93497f13d7d 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -473,16 +473,16 @@ void ScriptInterpreterPython::IOHandlerInputComplete(IOHandler &io_handler,
if (!bp_options)
continue;
- auto data_ap = llvm::make_unique<CommandDataPython>();
- if (!data_ap)
+ auto data_up = llvm::make_unique<CommandDataPython>();
+ if (!data_up)
break;
- data_ap->user_source.SplitIntoLines(data);
+ data_up->user_source.SplitIntoLines(data);
- if (GenerateBreakpointCommandCallbackData(data_ap->user_source,
- data_ap->script_source)
+ if (GenerateBreakpointCommandCallbackData(data_up->user_source,
+ data_up->script_source)
.Success()) {
auto baton_sp = std::make_shared<BreakpointOptions::CommandBaton>(
- std::move(data_ap));
+ std::move(data_up));
bp_options->SetCallback(
ScriptInterpreterPython::BreakpointCallbackFunction, baton_sp);
} else if (!batch_mode) {
@@ -498,13 +498,13 @@ void ScriptInterpreterPython::IOHandlerInputComplete(IOHandler &io_handler,
case eIOHandlerWatchpoint: {
WatchpointOptions *wp_options =
(WatchpointOptions *)io_handler.GetUserData();
- auto data_ap = llvm::make_unique<WatchpointOptions::CommandData>();
- data_ap->user_source.SplitIntoLines(data);
+ auto data_up = llvm::make_unique<WatchpointOptions::CommandData>();
+ data_up->user_source.SplitIntoLines(data);
- if (GenerateWatchpointCommandCallbackData(data_ap->user_source,
- data_ap->script_source)) {
+ if (GenerateWatchpointCommandCallbackData(data_up->user_source,
+ data_up->script_source)) {
auto baton_sp =
- std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_ap));
+ std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up));
wp_options->SetCallback(
ScriptInterpreterPython::WatchpointCallbackFunction, baton_sp);
} else if (!batch_mode) {
@@ -797,15 +797,15 @@ bool ScriptInterpreterPython::ExecuteOneLine(
#if defined(_WIN32)
lldb::file_t read_file = pipe.GetReadNativeHandle();
pipe.ReleaseReadFileDescriptor();
- std::unique_ptr<ConnectionGenericFile> conn_ap(
+ std::unique_ptr<ConnectionGenericFile> conn_up(
new ConnectionGenericFile(read_file, true));
#else
- std::unique_ptr<ConnectionFileDescriptor> conn_ap(
+ std::unique_ptr<ConnectionFileDescriptor> conn_up(
new ConnectionFileDescriptor(pipe.ReleaseReadFileDescriptor(),
true));
#endif
- if (conn_ap->IsConnected()) {
- output_comm.SetConnection(conn_ap.release());
+ if (conn_up->IsConnected()) {
+ output_comm.SetConnection(conn_up.release());
output_comm.SetReadThreadBytesReceivedCallback(
ReadThreadBytesReceived, &result->GetOutputStream());
output_comm.StartReadThread();
@@ -1299,19 +1299,19 @@ Status ScriptInterpreterPython::SetBreakpointCommandCallback(
// Set a Python one-liner as the callback for the breakpoint.
Status ScriptInterpreterPython::SetBreakpointCommandCallback(
BreakpointOptions *bp_options, const char *command_body_text) {
- auto data_ap = llvm::make_unique<CommandDataPython>();
+ auto data_up = llvm::make_unique<CommandDataPython>();
// Split the command_body_text into lines, and pass that to
// GenerateBreakpointCommandCallbackData. That will wrap the body in an
// auto-generated function, and return the function name in script_source.
// That is what the callback will actually invoke.
- data_ap->user_source.SplitIntoLines(command_body_text);
- Status error = GenerateBreakpointCommandCallbackData(data_ap->user_source,
- data_ap->script_source);
+ data_up->user_source.SplitIntoLines(command_body_text);
+ Status error = GenerateBreakpointCommandCallbackData(data_up->user_source,
+ data_up->script_source);
if (error.Success()) {
auto baton_sp =
- std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_ap));
+ std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up));
bp_options->SetCallback(ScriptInterpreterPython::BreakpointCallbackFunction,
baton_sp);
return error;
@@ -1322,20 +1322,20 @@ Status ScriptInterpreterPython::SetBreakpointCommandCallback(
// Set a Python one-liner as the callback for the watchpoint.
void ScriptInterpreterPython::SetWatchpointCommandCallback(
WatchpointOptions *wp_options, const char *oneliner) {
- auto data_ap = llvm::make_unique<WatchpointOptions::CommandData>();
+ auto data_up = llvm::make_unique<WatchpointOptions::CommandData>();
// It's necessary to set both user_source and script_source to the oneliner.
// The former is used to generate callback description (as in watchpoint
// command list) while the latter is used for Python to interpret during the
// actual callback.
- data_ap->user_source.AppendString(oneliner);
- data_ap->script_source.assign(oneliner);
+ data_up->user_source.AppendString(oneliner);
+ data_up->script_source.assign(oneliner);
- if (GenerateWatchpointCommandCallbackData(data_ap->user_source,
- data_ap->script_source)) {
+ if (GenerateWatchpointCommandCallbackData(data_up->user_source,
+ data_up->script_source)) {
auto baton_sp =
- std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_ap));
+ std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up));
wp_options->SetCallback(ScriptInterpreterPython::WatchpointCallbackFunction,
baton_sp);
}
OpenPOWER on IntegriCloud