r299217 - Add back test for r299152

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 06:48:18 PDT 2017


Author: tejohnson
Date: Fri Mar 31 08:48:18 2017
New Revision: 299217

URL: http://llvm.org/viewvc/llvm-project?rev=299217&view=rev
Log:
Add back test for r299152

I am hoping the bot failures are addressed by using cc1 for the ThinLTO
backend invocations as well.

Modified:
    cfe/trunk/test/CodeGen/function-sections.c

Modified: cfe/trunk/test/CodeGen/function-sections.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/function-sections.c?rev=299217&r1=299216&r2=299217&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/function-sections.c (original)
+++ cfe/trunk/test/CodeGen/function-sections.c Fri Mar 31 08:48:18 2017
@@ -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() {}
 




More information about the cfe-commits mailing list