]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/lto/archive-no-index.ll
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / lto / archive-no-index.ll
1 ; REQUIRES: x86
2 ; Tests that we suggest that LTO symbols missing from an archive index
3 ; may be the cause of undefined references, but only if we both
4 ; encountered an empty archive index and undefined references (to prevent
5 ; noisy false alarms).
6
7 ; RUN: llvm-as -o %t1.o %s
8 ; RUN: llvm-as -o %t2.o %S/Inputs/archive.ll
9
10 ; RUN: rm -f %t1.a %t2.a
11 ; RUN: llvm-ar crS %t1.a %t2.o
12 ; RUN: llvm-ar crs %t2.a %t2.o
13
14 ; RUN: ld.lld -o %t -emain %t1.o %t1.a
15 ; RUN: ld.lld -o %t -emain %t1.o %t2.a
16
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 target triple = "x86_64-unknown-linux-gnu"
19
20 declare void @f()
21
22 define i32 @main() {
23   call void @f()
24   ret i32 0
25 }