mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
7d3d7f8d53
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
18 lines
449 B
LLVM
18 lines
449 B
LLVM
# RUN: llvm-as %S/Inputs/f.ll -o %t.f.bc
|
|
# RUN: llvm-as %S/Inputs/g.ll -o %t.g.bc
|
|
# RUN: llvm-ar cr %t.fg.a %t.f.bc %t.g.bc
|
|
# RUN: llvm-ar cr %t.empty.lib
|
|
# RUN: llvm-link %S/Inputs/h.ll %t.fg.a %t.empty.lib -o %t.linked.bc
|
|
|
|
# RUN: llvm-nm %t.linked.bc | FileCheck %s
|
|
|
|
# RUN: rm -f %t.f.bc
|
|
# RUN: rm -f %t.g.bc
|
|
# RUN: rm -f %t.fg.a
|
|
# RUN: rm -f %t.empty.a
|
|
# RUN: rm -f %t.linked.bc
|
|
|
|
# CHECK: -------- T f
|
|
# CHECK: -------- T g
|
|
# CHECK: -------- T h
|