diff options
-rw-r--r-- | lldb/include/lldb/Utility/Reproducer.h | 4 | ||||
-rw-r--r-- | lldb/source/Utility/Reproducer.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/include/lldb/Utility/Reproducer.h b/lldb/include/lldb/Utility/Reproducer.h index 60e6ffe65a5..cc50b26330d 100644 --- a/lldb/include/lldb/Utility/Reproducer.h +++ b/lldb/include/lldb/Utility/Reproducer.h @@ -113,12 +113,12 @@ private: class DataRecorder { public: - DataRecorder(FileSpec filename, std::error_code &ec) + DataRecorder(const FileSpec &filename, std::error_code &ec) : m_filename(std::move(filename)), m_os(m_filename.GetPath(), ec, llvm::sys::fs::F_Text), m_record(true) {} static llvm::Expected<std::unique_ptr<DataRecorder>> - Create(FileSpec filename); + Create(const FileSpec &filename); template <typename T> void Record(const T &t, bool newline = false) { if (!m_record) diff --git a/lldb/source/Utility/Reproducer.cpp b/lldb/source/Utility/Reproducer.cpp index 967521c4364..f5ca39cddc7 100644 --- a/lldb/source/Utility/Reproducer.cpp +++ b/lldb/source/Utility/Reproducer.cpp @@ -221,7 +221,7 @@ bool Loader::HasFile(StringRef file) { } llvm::Expected<std::unique_ptr<DataRecorder>> -DataRecorder::Create(FileSpec filename) { +DataRecorder::Create(const FileSpec &filename) { std::error_code ec; auto recorder = llvm::make_unique<DataRecorder>(std::move(filename), ec); if (ec) |