[Lldb-commits] [lldb] 437e37d - [nfc] [lldb] Support moving support files instead of copy

Jan Kratochvil via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 2 12:43:49 PDT 2021


Author: Eric Leese
Date: 2021-08-02T21:43:34+02:00
New Revision: 437e37dd553917ef890821d5045f898f065e4d47

URL: https://github.com/llvm/llvm-project/commit/437e37dd553917ef890821d5045f898f065e4d47
DIFF: https://github.com/llvm/llvm-project/commit/437e37dd553917ef890821d5045f898f065e4d47.diff

LOG: [nfc] [lldb] Support moving support files instead of copy

Split from D100299.

Reviewed By: jankratochvil

Differential Revision: https://reviews.llvm.org/D107165

Added: 
    

Modified: 
    lldb/include/lldb/Symbol/CompileUnit.h
    lldb/source/Symbol/CompileUnit.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Symbol/CompileUnit.h b/lldb/include/lldb/Symbol/CompileUnit.h
index c9a8a19f09624..34e34e5514df3 100644
--- a/lldb/include/lldb/Symbol/CompileUnit.h
+++ b/lldb/include/lldb/Symbol/CompileUnit.h
@@ -332,6 +332,7 @@ class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
   void SetLineTable(LineTable *line_table);
 
   void SetSupportFiles(const FileSpecList &support_files);
+  void SetSupportFiles(FileSpecList &&support_files);
 
   void SetDebugMacros(const DebugMacrosSP &debug_macros);
 

diff  --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp
index 1b258516fac86..6c4a36d451959 100644
--- a/lldb/source/Symbol/CompileUnit.cpp
+++ b/lldb/source/Symbol/CompileUnit.cpp
@@ -181,6 +181,10 @@ void CompileUnit::SetSupportFiles(const FileSpecList &support_files) {
   m_support_files = support_files;
 }
 
+void CompileUnit::SetSupportFiles(FileSpecList &&support_files) {
+  m_support_files = std::move(support_files);
+}
+
 DebugMacros *CompileUnit::GetDebugMacros() {
   if (m_debug_macros_sp.get() == nullptr) {
     if (m_flags.IsClear(flagsParsedDebugMacros)) {


        


More information about the lldb-commits mailing list