llvm-project
38 строк · 957.0 Байт
1; REQUIRES: x86
2; RUN: rm -rf %t; split-file %s %t
3
4; RUN: opt -module-summary %t/f.ll -o %t/1.o
5; RUN: opt -module-summary %t/g.ll -o %t/2.o
6; RUN: opt -module-summary %t/empty.ll -o %t/3.o
7
8;; Ensure lld writes linked files to linked objects file
9; RUN: %lld --thinlto-index-only=%t/1.txt -dylib %t/1.o %t/2.o %t/3.o -o /dev/null
10; RUN: FileCheck %s < %t/1.txt
11; CHECK: 1.o
12; CHECK: 2.o
13; CHECK: 3.o
14
15;--- f.ll
16target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
17target triple = "x86_64-apple-darwin"
18
19declare void @g(...)
20
21define void @f() {
22entry:
23call void (...) @g()
24ret void
25}
26
27;--- g.ll
28target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
29target triple = "x86_64-apple-darwin"
30
31define void @g() {
32entry:
33ret void
34}
35
36;--- empty.ll
37target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
38target triple = "x86_64-apple-darwin"
39