16 lines · plain
1; Test to ensure -mllvm work when invoking the ThinLTO backend path.2 3; This test uses a non-existent backend option to test that backend options are4; being parsed. While it's more important that the existing options are parsed5; than that this error is produced, this provides a reliable way to test this6; scenario independent of any particular backend options that may exist now or7; in the future.8 9; RUN: %clang -flto=thin -c -o %t.o %s10; RUN: llvm-lto -thinlto -o %t %t.o11; 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=UNKNOWN12; UNKNOWN: clang (LLVM option parsing): Unknown command line argument '-nonexistent'13 14; RUN: not %clang_cc1 -flto=thinfoo 2>&1 | FileCheck %s -check-prefix=INVALID15; INVALID: error: invalid value 'thinfoo' in '-flto=thinfoo'16