From: Teresa Johnson Date: Fri, 31 Mar 2017 13:48:18 +0000 (+0000) Subject: Add back test for r299152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef8a2a5303c880a77fefa8250c924e094c924060;p=clang 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 --- diff --git a/test/CodeGen/function-sections.c b/test/CodeGen/function-sections.c index 734b7e2fc9..c34216dec6 100644 --- a/test/CodeGen/function-sections.c +++ b/test/CodeGen/function-sections.c @@ -9,6 +9,12 @@ // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-data-sections -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT +// Try again through a clang invocation of the ThinLTO backend. +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O2 %s -flto=thin -emit-llvm-bc -o %t.o +// RUN: llvm-lto -thinlto -o %t %t.o +// 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 +// 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 + const int hello = 123; void world() {}