brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 3eb8c25 Raw
27 lines · c
1// The coverage reader should be able to handle universal binaries2 3// CHECK: [[@LINE+1]]| 100|int main4int main(int argc, const char *argv[]) {}5 6// RUN: llvm-profdata merge %S/Inputs/universal-binary.proftext -o %t.profdata7// RUN: llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch x86_64 | FileCheck %s8 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=COMBINED10// RUN: llvm-cov report %S/Inputs/universal-binary -arch x86_64 -object %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=COMBINED11// RUN: not llvm-cov report %S/Inputs/universal-binary -arch i386 -object %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata 2>&1 | FileCheck %s --check-prefix=WRONG-ARCH12// COMBINED: showTemplateInstantiations.cpp13// COMBINED-NEXT: universal-binary.c14 15// RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s 2>&1 | FileCheck --check-prefix=WRONG-ARCH %s16// 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 %s17// WRONG-ARCH: failed to load coverage: '{{.*}}universal-binary': `-arch` specifier is invalid or missing for universal binary18 19// 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 %s20// MADE-UP-ARCH: unknown architecture: definitly_a_made_up_architecture21 22// 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 %s23// TOO-MANY-ARCH: number of architectures doesn't match the number of objects24//25// RUN: not llvm-cov report -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=MISSING-BINARY %s26// MISSING-BINARY: No filenames specified!27