|
1 | 1 | // REQUIRES: x86-registered-target |
2 | 2 |
|
3 | | -// RUN: not %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -fsplit-lto-unit -emit-llvm < %s 2>&1 | FileCheck %s --check-prefixes=NO-UNIFIED |
| 3 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -fsplit-lto-unit -emit-llvm < %s | FileCheck %s --check-prefixes=FULL,SPLIT |
| 4 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=FULL,SPLIT |
4 | 5 |
|
5 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -funified-lto -ffat-lto-objects -fsplit-lto-unit -emit-llvm < %s | FileCheck %s --check-prefixes=FULL,SPLIT,UNIFIED |
6 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -funified-lto -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=FULL,NOSPLIT,UNIFIED |
| 6 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -fsplit-lto-unit -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=THIN,SPLIT |
| 7 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=THIN,NOSPLIT |
7 | 8 |
|
8 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -funified-lto -fsplit-lto-unit -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=THIN,SPLIT,UNIFIED |
9 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -funified-lto -ffat-lto-objects -emit-llvm < %s | FileCheck %s --check-prefixes=THIN,NOSPLIT,UNIFIED |
10 | | - |
11 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -funified-lto -ffat-lto-objects -fsplit-lto-unit -emit-obj < %s -o %t.full.split.o |
| 9 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -fsplit-lto-unit -emit-obj < %s -o %t.full.split.o |
12 | 10 | // RUN: llvm-readelf -S %t.full.split.o | FileCheck %s --check-prefixes=ELF |
13 | 11 | // RUN: llvm-objcopy --dump-section=.llvm.lto=%t.full.split.bc %t.full.split.o |
14 | | -// RUN: llvm-dis %t.full.split.bc -o - | FileCheck %s --check-prefixes=THIN,SPLIT,UNIFIED |
| 12 | +// RUN: llvm-dis %t.full.split.bc -o - | FileCheck %s --check-prefixes=FULL,SPLIT,NOUNIFIED |
15 | 13 |
|
16 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -funified-lto -ffat-lto-objects -emit-obj < %s -o %t.full.nosplit.o |
| 14 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -emit-obj < %s -o %t.full.nosplit.o |
17 | 15 | // RUN: llvm-readelf -S %t.full.nosplit.o | FileCheck %s --check-prefixes=ELF |
18 | 16 | // RUN: llvm-objcopy --dump-section=.llvm.lto=%t.full.nosplit.bc %t.full.nosplit.o |
19 | | -// RUN: llvm-dis %t.full.nosplit.bc -o - | FileCheck %s --check-prefixes=THIN,NOSPLIT,UNIFIED |
| 17 | +// RUN: llvm-dis %t.full.nosplit.bc -o - | FileCheck %s --check-prefixes=FULL,NOSPLIT,NOUNIFIED |
20 | 18 |
|
21 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -funified-lto -fsplit-lto-unit -ffat-lto-objects -emit-obj < %s -o %t.thin.split.o |
| 19 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -fsplit-lto-unit -ffat-lto-objects -emit-obj < %s -o %t.thin.split.o |
22 | 20 | // RUN: llvm-readelf -S %t.thin.split.o | FileCheck %s --check-prefixes=ELF |
23 | 21 | // RUN: llvm-objcopy --dump-section=.llvm.lto=%t.thin.split.bc %t.thin.split.o |
24 | | -// RUN: llvm-dis %t.thin.split.bc -o - | FileCheck %s --check-prefixes=THIN,SPLIT,UNIFIED |
| 22 | +// RUN: llvm-dis %t.thin.split.bc -o - | FileCheck %s --check-prefixes=THIN,SPLIT,NOUNIFIED |
25 | 23 |
|
26 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -funified-lto -ffat-lto-objects -emit-obj < %s -o %t.thin.nosplit.o |
| 24 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -ffat-lto-objects -emit-obj < %s -o %t.thin.nosplit.o |
27 | 25 | // RUN: llvm-readelf -S %t.thin.nosplit.o | FileCheck %s --check-prefixes=ELF |
28 | 26 | // RUN: llvm-objcopy --dump-section=.llvm.lto=%t.thin.nosplit.bc %t.thin.nosplit.o |
29 | | -// RUN: llvm-dis %t.thin.nosplit.bc -o - | FileCheck %s --check-prefixes=THIN,NOSPLIT,UNIFIED |
| 27 | +// RUN: llvm-dis %t.thin.nosplit.bc -o - | FileCheck %s --check-prefixes=THIN,NOSPLIT,NOUNIFIED |
| 28 | + |
| 29 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=thin -funified-lto -ffat-lto-objects -emit-obj < %s -o %t.unified.o |
| 30 | +// RUN: llvm-readelf -S %t.unified.o | FileCheck %s --check-prefixes=ELF |
| 31 | +// RUN: llvm-objcopy --dump-section=.llvm.lto=%t.unified.bc %t.unified.o |
| 32 | +// RUN: llvm-dis %t.unified.bc -o - | FileCheck %s --check-prefixes=THIN,NOSPLIT,UNIFIED |
30 | 33 |
|
31 | | -// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -funified-lto -ffat-lto-objects -fsplit-lto-unit -S < %s -o - \ |
| 34 | +// RUN: %clang -cc1 -triple x86_64-unknown-linux-gnu -flto=full -ffat-lto-objects -fsplit-lto-unit -S < %s -o - \ |
32 | 35 | // RUN: | FileCheck %s --check-prefixes=ASM |
33 | 36 |
|
34 | 37 | /// Be sure we enable split LTO units correctly under -ffat-lto-objects. |
|
38 | 41 | // FULL-NOT: ![[#]] = !{i32 1, !"ThinLTO", i32 0} |
39 | 42 | // THIN-NOT: ![[#]] = !{i32 1, !"ThinLTO", i32 0} |
40 | 43 |
|
41 | | -/// FatLTO always uses UnifiedLTO. It's an error if they aren't set together |
42 | | -// UNIFIED: ![[#]] = !{i32 1, !"UnifiedLTO", i32 1} |
43 | | -// NO-UNIFIED: error: invalid argument '-ffat-lto-objects' only allowed with '-funified-lto' |
| 44 | +// UNIFIED: ![[#]] = !{i32 1, !"UnifiedLTO", i32 1} |
| 45 | +// NOUNIFIED-NOT: ![[#]] = !{i32 1, !"UnifiedLTO", i32 1} |
44 | 46 |
|
45 | 47 | // ELF: .llvm.lto |
46 | 48 |
|
|
0 commit comments