2017-03-29 05:20:06 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
; Tests that we suggest that LTO symbols missing from an archive index
|
|
|
|
; may be the cause of undefined references, but only if we both
|
|
|
|
; encountered an empty archive index and undefined references (to prevent
|
|
|
|
; noisy false alarms).
|
|
|
|
|
2017-05-04 05:03:08 +08:00
|
|
|
; RUN: llvm-as -o %t1.o %s
|
|
|
|
; RUN: llvm-as -o %t2.o %S/Inputs/archive.ll
|
2017-03-29 05:20:06 +08:00
|
|
|
|
2017-05-04 05:03:08 +08:00
|
|
|
; RUN: rm -f %t1.a %t2.a
|
|
|
|
; RUN: llvm-ar crS %t1.a %t2.o
|
|
|
|
; RUN: llvm-ar crs %t2.a %t2.o
|
2017-03-29 05:20:06 +08:00
|
|
|
|
2017-05-04 05:03:08 +08:00
|
|
|
; RUN: ld.lld -o %t -emain -m elf_x86_64 %t1.o %t1.a
|
|
|
|
; RUN: ld.lld -o %t -emain -m elf_x86_64 %t1.o %t2.a
|
2017-03-29 05:20:06 +08:00
|
|
|
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
declare void @f()
|
|
|
|
|
|
|
|
define i32 @main() {
|
|
|
|
call void @f()
|
|
|
|
ret i32 0
|
|
|
|
}
|