blob: 6def5821b6a2e60b2a45ae337265c40a783df8dd [file] [log] [blame]
Teresa Johnsonecc80382015-12-07 20:40:36 +00001// RUN: %clang -O2 %s -flto=thin -c -o %t.o
Teresa Johnsonaff22322015-12-07 19:21:34 +00002// RUN: llvm-lto -thinlto -o %t %t.o
3
4// -fthinlto_index should be passed to cc1
Teresa Johnsonecc80382015-12-07 20:40:36 +00005// 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
Teresa Johnsonaff22322015-12-07 19:21:34 +00006// CHECK-THINLTOBE-ACTION: -fthinlto-index=
7
8// Ensure clang driver gives the expected error for incorrect input type
Teresa Johnsonecc80382015-12-07 20:40:36 +00009// RUN: not %clang -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
Teresa Johnsonaff22322015-12-07 19:21:34 +000010// CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'