diff options
Diffstat (limited to 'test/CodeGen/thinlto-emit-llvm.c')
-rw-r--r-- | test/CodeGen/thinlto-emit-llvm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/thinlto-emit-llvm.c b/test/CodeGen/thinlto-emit-llvm.c new file mode 100644 index 000000000000..f611162d1999 --- /dev/null +++ b/test/CodeGen/thinlto-emit-llvm.c @@ -0,0 +1,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() { +} |