Teresa Johnson | b637cb0 | 2017-03-31 22:35:47 +0000 | [diff] [blame] | 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 | |
Hans Wennborg | 8f1559c | 2017-08-30 23:26:38 +0000 | [diff] [blame] | 8 | // CHECK: define{{.*}} void @foo() |
Teresa Johnson | b637cb0 | 2017-03-31 22:35:47 +0000 | [diff] [blame] | 9 | void foo() { |
| 10 | } |