1 // The coverage reader should be able to handle universal binaries 2 3 // CHECK: [[@LINE+1]]| 100|int main 4 int main(int argc, const char *argv[]) {} 5 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 8 // RUN: llvm-cov export %S/Inputs/universal-binary -instr-profile %t.profdata -arch x86_64 2>&1 | FileCheck %S/Inputs/universal-binary.json 9 10 // 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 11 // COMBINED: showTemplateInstantiations.cpp 12 // COMBINED-NEXT: universal-binary.c 13 14 // 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 15 // WRONG-ARCH: Failed to load coverage 16 17 // 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 18 // MADE-UP-ARCH: Unknown architecture: definitly_a_made_up_architecture 19 20 // 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 21 // TOO-MANY-ARCH: Number of architectures doesn't match the number of objects 22 // 23 // RUN: not llvm-cov report -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=MISSING-BINARY %s 24 // MISSING-BINARY: No filenames specified! 25