[all-commits] [llvm/llvm-project] 401296: Object: account for short output names (#66532)

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Fri Sep 15 12:58:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 401296f697b4ec2088afa0637d698999b2fe7228
      https://github.com/llvm/llvm-project/commit/401296f697b4ec2088afa0637d698999b2fe7228
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M lld/test/COFF/implib-name.test
    M llvm/lib/Object/COFFImportFile.cpp

  Log Message:
  -----------
  Object: account for short output names (#66532)

The import library thunk name suffix uses the stem of the file. We
currently would attempt to trim the suffix by dropping the trailing 4
characters (under the assumption that the output name was `.lib`). This
now uses the `llvm::sys::path` API for computing the stem. This avoids
an assertion failure when the name is less the 4 characters and
assertions are enabled.




More information about the All-commits mailing list