2 ;; Show that whether an object is a bitcode file or regular ELF object does not
3 ;; make any difference to which file is selected from an archive.
6 ; RUN: split-file %s %t.dir
9 ; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux ref.s -o ref.o
10 ; RUN: llvm-as a.ll -o a.bc
11 ; RUN: llvm-as b.ll -o b.bc
12 ; RUN: llc -filetype=obj a.ll -o a.o
13 ; RUN: llc -filetype=obj b.ll -o b.o
15 ; RUN: llvm-ar rc a.bc.b.bc.a a.bc b.bc
16 ; RUN: llvm-ar rc a.bc.b.o.a a.bc b.o
17 ; RUN: llvm-ar rc a.o.b.bc.a a.o b.bc
18 ; RUN: llvm-ar rc a.o.b.o.a a.o b.o
19 ; RUN: llvm-ar rc other.bc.a a.bc
20 ; RUN: llvm-ar rc other.o.a a.o
22 ; RUN: ld.lld -o /dev/null --trace ref.o a.bc.b.bc.a other.bc.a | \
23 ; RUN: FileCheck %s --implicit-check-not={{.}}
24 ; RUN: ld.lld -o /dev/null --trace ref.o a.bc.b.bc.a other.o.a | \
25 ; RUN: FileCheck %s --implicit-check-not={{.}}
26 ; RUN: ld.lld -o /dev/null --trace ref.o a.bc.b.o.a other.bc.a | \
27 ; RUN: FileCheck %s --implicit-check-not={{.}}
28 ; RUN: ld.lld -o /dev/null --trace ref.o a.bc.b.o.a other.o.a | \
29 ; RUN: FileCheck %s --implicit-check-not={{.}}
30 ; RUN: ld.lld -o /dev/null --trace ref.o a.o.b.bc.a other.bc.a | \
31 ; RUN: FileCheck %s --implicit-check-not={{.}}
32 ; RUN: ld.lld -o /dev/null --trace ref.o a.o.b.bc.a other.o.a | \
33 ; RUN: FileCheck %s --implicit-check-not={{.}}
34 ; RUN: ld.lld -o /dev/null --trace ref.o a.o.b.o.a other.bc.a | \
35 ; RUN: FileCheck %s --implicit-check-not={{.}}
36 ;; Not an LTO test case, but here for completeness.
37 ; RUN: ld.lld -o /dev/null --trace ref.o a.o.b.o.a other.o.a | \
38 ; RUN: FileCheck %s --implicit-check-not={{.}}
41 ; CHECK-NEXT: a.{{.*}}.b.{{.*}}.a(b.{{.*}})
42 ; CHECK-NEXT: a.{{.*}}.b.{{.*}}.a(a.{{.*}})
45 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
46 target triple = "x86_64-unknown-linux"
52 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
53 target triple = "x86_64-unknown-linux"