1*67e74705SXin Li // RUN: %clang -O2 %s -flto=thin -c -o %t.o 2*67e74705SXin Li // RUN: llvm-lto -thinlto -o %t %t.o 3*67e74705SXin Li 4*67e74705SXin Li // -fthinlto_index should be passed to cc1 5*67e74705SXin Li // RUN: %clang -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -### 2>&1 | FileCheck %s -check-prefix=CHECK-THINLTOBE-ACTION 6*67e74705SXin Li // CHECK-THINLTOBE-ACTION: -fthinlto-index= 7*67e74705SXin Li 8*67e74705SXin Li // Ensure clang driver gives the expected error for incorrect input type 9*67e74705SXin Li // RUN: not %clang -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING 10*67e74705SXin Li // CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir' 11