[all-commits] [llvm/llvm-project] 5bae3a: [lldb] Remove CompileUnit::SetSupportFiles overloa...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Oct 19 11:14:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5bae3a0b0ccf8f4f2bcffc86453197f3cc5a9829
      https://github.com/llvm/llvm-project/commit/5bae3a0b0ccf8f4f2bcffc86453197f3cc5a9829
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2023-10-19 (Thu, 19 Oct 2023)

  Changed paths:
    M lldb/include/lldb/Symbol/CompileUnit.h
    M lldb/source/Symbol/CompileUnit.cpp

  Log Message:
  -----------
  [lldb] Remove CompileUnit::SetSupportFiles overload (NFC)

CompileUnit::SetSupportFiles had two overloads, one that took and lvalue
reference and one that takes an rvalue reference. This removes both and
replaces it with an overload that takes the FileSpecList by value and
moves it into the member variable.

Because we're storing the value as a member, this covers both cases. If
the new FileSpecList was passed by lvalue reference, we'd copy it into
the member anyway. If it was passed as an rvalue reference, we'll have
created a new instance using its move and then immediately move it again
into our member. In either case the number of copies remains unchanged.




More information about the All-commits mailing list