blob: b25b584a2fe1c6a5212100f4541f846656d55bb3 [file] [log] [blame]
Eli Friedman01d349b2018-04-12 22:21:36 +00001; Test to ensure -mllvm work when invoking the ThinLTO backend path.
David Blaikie6e2ec5f2017-04-19 20:08:21 +00002
3; This test uses a non-existent backend option to test that backend options are
4; being parsed. While it's more important that the existing options are parsed
5; than that this error is produced, this provides a reliable way to test this
6; scenario independent of any particular backend options that may exist now or
7; in the future.
8
9; RUN: %clang -flto=thin -c -o %t.o %s
10; RUN: llvm-lto -thinlto -o %t %t.o
Eli Friedman01d349b2018-04-12 22:21:36 +000011; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -mllvm -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s -check-prefix=UNKNOWN
12; UNKNOWN: clang (LLVM option parsing): Unknown command line argument '-nonexistent'
David Blaikie6e2ec5f2017-04-19 20:08:21 +000013
Yuka Takahashi50a9dfa2017-06-14 15:37:11 +000014; RUN: not %clang_cc1 -flto=thinfoo 2>&1 | FileCheck %s -check-prefix=INVALID
15; INVALID: error: invalid value 'thinfoo' in '-flto=thinfoo'