1 // The coverage reader should be able to handle universal binaries
3 // CHECK: [[@LINE+1]]| 100|int main
4 int main(int argc
, const char *argv
[]) {}
6 // RUN: llvm-profdata merge %S/Inputs/universal-binary.proftext -o %t.profdata
7 // RUN: llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch x86_64 | FileCheck %s
9 // RUN: llvm-cov report %S/Inputs/universal-binary -arch x86_64 -object %S/Inputs/templateInstantiations.covmapping -arch i386 -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=COMBINED
10 // COMBINED: showTemplateInstantiations.cpp
11 // COMBINED-NEXT: universal-binary.c
13 // RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch i386 2>&1 | FileCheck --check-prefix=WRONG-ARCH %s
14 // WRONG-ARCH: Failed to load coverage
16 // RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch definitly_a_made_up_architecture 2>&1 | FileCheck --check-prefix=MADE-UP-ARCH %s
17 // MADE-UP-ARCH: Unknown architecture: definitly_a_made_up_architecture
19 // RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch=x86_64 -arch=x86_64 2>&1 | FileCheck --check-prefix=TOO-MANY-ARCH %s
20 // TOO-MANY-ARCH: Number of architectures doesn't match the number of objects
22 // RUN: not llvm-cov report -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=MISSING-BINARY %s
23 // MISSING-BINARY: No filenames specified!