summaryrefslogtreecommitdiff
path: root/test/CodeGen/thinlto-emit-llvm.c
blob: d6ef6650243eba24994a287f22d0f3f525e7ca35 (plain)
1
2
3
4
5
6
7
8
9
10
// Test to ensure -emit-llvm and -emit-llvm-bc work when invoking the
// ThinLTO backend path.
// RUN: %clang -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm-bc -o - | llvm-dis -o - | FileCheck %s

// CHECK: define{{.*}} void @foo()
void foo() {
}