xref: /llvm-project/llvm/test/tools/llvm-lto/error.ll (revision 42a21778f61cdc8462ce2cfb6ad7bc1992b2063c)
1; RUN: not llvm-lto foobar 2>&1 | FileCheck -DMSG=%errc_ENOENT %s
2; CHECK: llvm-lto: error loading file 'foobar': [[MSG]]
3
4; RUN: not llvm-lto --list-symbols-only %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-LIST
5; CHECK-LIST: llvm-lto: error loading file '{{.*}}/Inputs/empty.bc': The file was not recognized as a valid object file
6
7; RUN: not llvm-lto --list-dependent-libraries-only %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-LIBS
8; CHECK-LIBS: llvm-lto: {{.*}}/Inputs/empty.bc: Could not read LTO input file: The file was not recognized as a valid object file
9
10; RUN: not llvm-lto --print-macho-cpu-only %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO
11; CHECK-MACHO: llvm-lto: error: The file was not recognized as a valid object file
12
13; RUN: not llvm-lto --thinlto %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-THIN
14; CHECK-THIN: llvm-lto: error loading file '{{.*}}/Inputs/empty.bc': file too small to contain bitcode header
15