xref: /llvm-project/llvm/test/tools/llvm-link/archive-only-needed.ll (revision 41d5033eb162cb92b684855166cabfa3983b74c6)
1; RUN: llvm-as %S/Inputs/f.ll -o %t.f.bc
2; RUN: llvm-as %S/Inputs/g.ll -o %t.g.bc
3; RUN: llvm-as %S/Inputs/i.ll -o %t.i.bc
4; RUN: rm -f %t.lib
5; RUN: llvm-ar cr %t.lib %t.f.bc %t.g.bc %t.i.bc
6; RUN: llvm-link %s %t.lib -o %t.linked.bc --only-needed
7; RUN: llvm-nm %t.linked.bc | FileCheck %s
8
9; CHECK: -------- T f
10; CHECK: -------- T i
11
12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13
14@i = external global ptr
15@llvm.used = appending global [1 x ptr] [ptr @i], section "llvm.metadata"
16