mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
267d2a2041
llvm-cov reports a poor error message when the -arch specifier is missing or invalid, and a binary has multiple slices. Make the error message more specific. (This version of the patch avoids using llvm::none_of -- the way I used the utility caused compile errors on many bots, possibly because the wrong overload of `none_of` was selected.) rdar://40312677
25 lines
1.7 KiB
C
25 lines
1.7 KiB
C
// The coverage reader should be able to handle universal binaries
|
|
|
|
// CHECK: [[@LINE+1]]| 100|int main
|
|
int main(int argc, const char *argv[]) {}
|
|
|
|
// RUN: llvm-profdata merge %S/Inputs/universal-binary.proftext -o %t.profdata
|
|
// RUN: llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -arch x86_64 | FileCheck %s
|
|
|
|
// 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
|
|
// COMBINED: showTemplateInstantiations.cpp
|
|
// COMBINED-NEXT: universal-binary.c
|
|
|
|
// 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 %s
|
|
// 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
|
|
// WRONG-ARCH: Failed to load coverage: `-arch` specifier is invalid or missing for universal binary
|
|
|
|
// 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
|
|
// MADE-UP-ARCH: Unknown architecture: definitly_a_made_up_architecture
|
|
|
|
// 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
|
|
// TOO-MANY-ARCH: Number of architectures doesn't match the number of objects
|
|
//
|
|
// RUN: not llvm-cov report -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=MISSING-BINARY %s
|
|
// MISSING-BINARY: No filenames specified!
|