[Lldb-commits] [lldb] 57dd927 - [lldb] Return FileSP and StreamFileSP by value in IOHandler (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 16 21:15:14 PDT 2020
Author: Jonas Devlieghere
Date: 2020-09-16T21:15:05-07:00
New Revision: 57dd92746a53526bd7a86c1cfc7c0dce57a2e170
URL: https://github.com/llvm/llvm-project/commit/57dd92746a53526bd7a86c1cfc7c0dce57a2e170
DIFF: https://github.com/llvm/llvm-project/commit/57dd92746a53526bd7a86c1cfc7c0dce57a2e170.diff
LOG: [lldb] Return FileSP and StreamFileSP by value in IOHandler (NFC)
Smart pointers should be returned by value.
Added:
Modified:
lldb/include/lldb/Core/IOHandler.h
lldb/source/Core/IOHandler.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index c96dc1cd1888..2e8f3225fd5f 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -128,11 +128,11 @@ class IOHandler {
FILE *GetErrorFILE();
- lldb::FileSP &GetInputFileSP();
+ lldb::FileSP GetInputFileSP();
- lldb::StreamFileSP &GetOutputStreamFileSP();
+ lldb::StreamFileSP GetOutputStreamFileSP();
- lldb::StreamFileSP &GetErrorStreamFileSP();
+ lldb::StreamFileSP GetErrorStreamFileSP();
Debugger &GetDebugger() { return m_debugger; }
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 0648cf41f28a..8c654d9d8a98 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -103,11 +103,11 @@ FILE *IOHandler::GetErrorFILE() {
return (m_error_sp ? m_error_sp->GetFile().GetStream() : nullptr);
}
-FileSP &IOHandler::GetInputFileSP() { return m_input_sp; }
+FileSP IOHandler::GetInputFileSP() { return m_input_sp; }
-StreamFileSP &IOHandler::GetOutputStreamFileSP() { return m_output_sp; }
+StreamFileSP IOHandler::GetOutputStreamFileSP() { return m_output_sp; }
-StreamFileSP &IOHandler::GetErrorStreamFileSP() { return m_error_sp; }
+StreamFileSP IOHandler::GetErrorStreamFileSP() { return m_error_sp; }
bool IOHandler::GetIsInteractive() {
return GetInputFileSP() ? GetInputFileSP()->GetIsInteractive() : false;
More information about the lldb-commits
mailing list