[all-commits] [llvm/llvm-project] 55f8c2: [llvm-link] use file magic when deciding if input ...

Sergey Dmitriev via All-commits all-commits at lists.llvm.org
Wed Dec 2 16:48:56 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55f8c2fdfbc5eda1be946e97ecffa2dea44a883e
      https://github.com/llvm/llvm-project/commit/55f8c2fdfbc5eda1be946e97ecffa2dea44a883e
  Author: Sergey Dmitriev <serguei.n.dmitriev at intel.com>
  Date:   2020-12-02 (Wed, 02 Dec 2020)

  Changed paths:
    M llvm/test/tools/llvm-link/archive-bad.ll
    M llvm/test/tools/llvm-link/archive.ll
    M llvm/tools/llvm-link/llvm-link.cpp

  Log Message:
  -----------
  [llvm-link] use file magic when deciding if input should be loaded as archive

llvm-link should not rely on the '.a' file extension when deciding if input file
should be loaded as archive. Archives may have other extensions (f.e. .lib) or no
extensions at all. This patch changes llvm-link to use llvm::file_magic to check
if input file is an archive.

Reviewed By: RaviNarayanaswamy

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




More information about the All-commits mailing list