diff options
author | Adrian Prantl <aprantl@apple.com> | 2024-10-12 13:36:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-12 13:36:33 -0700 |
commit | c2750807ba2a419425ee90dadda09ad5121517fe (patch) | |
tree | 2723fed1f14e3a7111e7dc4b25728192b8fe5220 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | e866e6b8bbae8dc511706e97906825f9e153d68c (diff) | |
download | llvm-c2750807ba2a419425ee90dadda09ad5121517fe.zip llvm-c2750807ba2a419425ee90dadda09ad5121517fe.tar.gz llvm-c2750807ba2a419425ee90dadda09ad5121517fe.tar.bz2 |
[lldb] Rename CommandReturnObject::Get.*Data -> Get.*String (#112062)
In a later commit, I want to add a method to access diagnostics as
actual structured data, which will make these function names rather
confusing.
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index b4a8233..19bb420 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -2094,11 +2094,11 @@ bool CommandInterpreter::HandleCommand(const char *command_line, // used instead of `GetSaveTrasncript()`. This is because the latter will // fail when the command is "settings set interpreter.save-transcript true". if (transcript_item) { - m_transcript_stream << result.GetOutputData(); - m_transcript_stream << result.GetErrorData(); + m_transcript_stream << result.GetOutputString(); + m_transcript_stream << result.GetErrorString(); - transcript_item->AddStringItem("output", result.GetOutputData()); - transcript_item->AddStringItem("error", result.GetErrorData()); + transcript_item->AddStringItem("output", result.GetOutputString()); + transcript_item->AddStringItem("error", result.GetErrorString()); transcript_item->AddFloatItem("durationInSeconds", execute_time.get().count()); } @@ -2632,11 +2632,11 @@ void CommandInterpreter::HandleCommands(const StringList &commands, if (options.GetPrintResults()) { if (tmp_result.Succeeded()) - result.AppendMessage(tmp_result.GetOutputData()); + result.AppendMessage(tmp_result.GetOutputString()); } if (!success || !tmp_result.Succeeded()) { - llvm::StringRef error_msg = tmp_result.GetErrorData(); + llvm::StringRef error_msg = tmp_result.GetErrorString(); if (error_msg.empty()) error_msg = "<unknown error>.\n"; if (options.GetStopOnError()) { @@ -3192,7 +3192,7 @@ void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler, unsigned prompt_len = m_debugger.GetPrompt().size(); if (auto indent = result.GetDiagnosticIndent()) { llvm::StringRef diags = - result.GetInlineDiagnosticsData(prompt_len + *indent); + result.GetInlineDiagnosticString(prompt_len + *indent); PrintCommandOutput(io_handler, diags, true); } } @@ -3201,13 +3201,13 @@ void CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler, GetProcessOutput(); if (!result.GetImmediateOutputStream()) { - llvm::StringRef output = result.GetOutputData(); + llvm::StringRef output = result.GetOutputString(); PrintCommandOutput(io_handler, output, true); } // Now emit the command error text from the command we just executed. if (!result.GetImmediateErrorStream()) { - llvm::StringRef error = result.GetErrorData(); + llvm::StringRef error = result.GetErrorString(); PrintCommandOutput(io_handler, error, false); } } |