[all-commits] [llvm/llvm-project] 759798: [LinkerWrapper][NFC] Change interface to use a Str...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Jun 22 10:17:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75979887291426acd282d638795913697b65cecb
      https://github.com/llvm/llvm-project/commit/75979887291426acd282d638795913697b65cecb
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-06-22 (Wed, 22 Jun 2022)

  Changed paths:
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

  Log Message:
  -----------
  [LinkerWrapper][NFC] Change interface to use a StringRef to TempFiles

Summary:
Currently we use temporary files to write the intermediate results to.
However, these are stored as regular strings and we do a few unnecessary
copies and conversions of them. This patch simply replaces these strings
with a reference to the filename stored in the list of temporary files.
The temporary files will stay alive during the whole linking phase and
have stable pointers, so we should be able to cheaply pass references to
them rather than copying them every time.




More information about the All-commits mailing list