Skip to content

Commit ef8a2a5

Browse files
committed
Add back test for r299152
I am hoping the bot failures are addressed by using cc1 for the ThinLTO backend invocations as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299217 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b8297df commit ef8a2a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/CodeGen/function-sections.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
1010
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-data-sections -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
1111

12+
// Try again through a clang invocation of the ThinLTO backend.
13+
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O2 %s -flto=thin -emit-llvm-bc -o %t.o
14+
// RUN: llvm-lto -thinlto -o %t %t.o
15+
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -S -ffunction-sections -o - | FileCheck %s --check-prefix=FUNC_SECT
16+
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -S -fdata-sections -o - | FileCheck %s --check-prefix=DATA_SECT
17+
1218
const int hello = 123;
1319
void world() {}
1420

0 commit comments

Comments
 (0)