Clang Project

clang_source_code/test/CodeGen/thinlto-emit-llvm.c
1// Test to ensure -emit-llvm and -emit-llvm-bc work when invoking the
2// ThinLTO backend path.
3// RUN: %clang -O2 %s -flto=thin -c -o %t.o
4// RUN: llvm-lto -thinlto -o %t %t.o
5// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s
6// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm-bc -o - | llvm-dis -o - | FileCheck %s
7
8// CHECK: define{{.*}} void @foo()
9void foo() {
10}
11