• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: x86
2; RUN: rm -fr %t && mkdir %t && cd %t
3; RUN: mkdir thinlto-archives thinlto-archives/a thinlto-archives/b
4; RUN: opt -thinlto-bc -o thinlto-archives/main.o %s
5; RUN: opt -thinlto-bc -o thinlto-archives/a/thin.o %S/Inputs/thin1.ll
6; RUN: opt -thinlto-bc -o thinlto-archives/b/thin.o %S/Inputs/thin2.ll
7; RUN: llvm-ar qcT thinlto-archives/thin.a thinlto-archives/a/thin.o thinlto-archives/b/thin.o
8; RUN: ld.lld thinlto-archives/main.o thinlto-archives/thin.a -o thinlto-archives/main.exe --save-temps
9; RUN: FileCheck %s < thinlto-archives/main.exe.resolution.txt
10
11; CHECK: thinlto-archives/main.o
12; CHECK: thinlto-archives/thin.a(thin.o at {{[1-9][0-9]+}})
13; CHECK-NEXT: -r=thinlto-archives/thin.a(thin.o at {{[1-9][0-9]+}}),foo,pl
14; CHECK: thinlto-archives/thin.a(thin.o at {{[1-9][0-9]+}})
15; CHECK-NEXT: -r=thinlto-archives/thin.a(thin.o at {{[1-9][0-9]+}}),blah,pl
16
17target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
18target triple = "x86_64-scei-ps4"
19
20declare i32 @blah(i32 %meh)
21declare i32 @foo(i32 %goo)
22
23define i32 @_start() {
24  call i32 @foo(i32 0)
25  call i32 @blah(i32 0)
26  ret i32 0
27}
28