• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -O2 %s -flto=thin -c -o %t.o
2 // RUN: llvm-lto -thinlto -o %t %t.o
3 
4 // Ensure clang -cc1 give expected error for incorrect input type
5 // RUN: not %clang_cc1 -O2 -o %t1.o %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
6 // CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
7 
8 // Ensure we get expected error for missing index file
9 // RUN: %clang -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR
10 // CHECK-ERROR: Error loading index file 'bad.thinlto.bc'
11 
12 // Ensure Function Importing pass added
13 // RUN: %clang -O2 -o %t1.o -x ir %t.o -c -fthinlto-index=%t.thinlto.bc -mllvm -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
14 // CHECK-PASS: Function Importing
15