blob: 9a28f77497f4b92dcbc5ccd24b3a85ba50f0ad48 [file] [log] [blame]
Teresa Johnsonaff22322015-12-07 19:21:34 +00001// RUN: %clang -target x86_64-unknown-linux -O2 %s -flto=thin -c -o %t.o
2// RUN: llvm-lto -thinlto -o %t %t.o
3
4// -fthinlto_index should be passed to cc1
5// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -### 2>&1 | FileCheck %s -check-prefix=CHECK-THINLTOBE-ACTION
6// CHECK-THINLTOBE-ACTION: -fthinlto-index=
7
8// Ensure clang driver gives the expected error for incorrect input type
9// RUN: not %clang -target x86_64-unknown-linux -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
10// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'