[Lldb-commits] [lldb] [DRAFT] Add support for inline DWARF source files. (PR #75880)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 19 08:39:54 PST 2023


================
@@ -38,7 +65,10 @@ class FileSpecList {
   FileSpecList(FileSpecList &&rhs) = default;
 
   /// Initialize this object from a vector of FileSpecs
-  FileSpecList(std::vector<FileSpec> &&rhs) : m_files(std::move(rhs)) {}
+  FileSpecList(std::vector<FileSpec> &&rhs) {
+    for (auto &fs : rhs)
+      m_files.emplace_back(fs);
----------------
adrian-prantl wrote:

Do you have a suggestion for how to fix this? Would adding a move constructor to FileSpec address your concern?

Note that FileSpecList is a value type that gets copied a lot, which informs many of the odd design choices in this patch.

https://github.com/llvm/llvm-project/pull/75880


More information about the lldb-commits mailing list