From d5b440369dbb0d41e6ecd47d6ac7410201e27f17 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 13 Feb 2019 06:25:41 +0000 Subject: 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 --- .../Python/ScriptInterpreterPython.cpp | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp') 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(); - if (!data_ap) + auto data_up = llvm::make_unique(); + 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( - 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(); - data_ap->user_source.SplitIntoLines(data); + auto data_up = llvm::make_unique(); + 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(std::move(data_ap)); + std::make_shared(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 conn_ap( + std::unique_ptr conn_up( new ConnectionGenericFile(read_file, true)); #else - std::unique_ptr conn_ap( + std::unique_ptr 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(); + auto data_up = llvm::make_unique(); // 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(std::move(data_ap)); + std::make_shared(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(); + auto data_up = llvm::make_unique(); // 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(std::move(data_ap)); + std::make_shared(std::move(data_up)); wp_options->SetCallback(ScriptInterpreterPython::WatchpointCallbackFunction, baton_sp); } -- cgit v1.2.3