diff options
| author | Vedant Kumar <vsk@apple.com> | 2017-08-01 21:23:26 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2017-08-01 21:23:26 +0000 |
| commit | 4b102c3d5c4f7232bf915a934eb3dbdd709fb471 (patch) | |
| tree | 754ebd6023e7c29995f166250312b353d13c7ca8 /llvm/test/tools/llvm-cov | |
| parent | 52889219effe9cb3646b921a1dec74d4e139ee7d (diff) | |
| download | bcm5719-llvm-4b102c3d5c4f7232bf915a934eb3dbdd709fb471.tar.gz bcm5719-llvm-4b102c3d5c4f7232bf915a934eb3dbdd709fb471.zip | |
[llvm-cov] Allow specifying distinct architectures for each loaded binary
The coverage tool needs to know which slice to look at when it's handed
a universal binary. Some projects need to look at aggregate coverage
reports for a variety of slices in different binaries: this patch adds
support for these kinds of projects to llvm-cov.
rdar://problem/33579007
llvm-svn: 309747
Diffstat (limited to 'llvm/test/tools/llvm-cov')
| -rw-r--r-- | llvm/test/tools/llvm-cov/universal-binary.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/universal-binary.c b/llvm/test/tools/llvm-cov/universal-binary.c index 1b15f98cb76..00f3e87b601 100644 --- a/llvm/test/tools/llvm-cov/universal-binary.c +++ b/llvm/test/tools/llvm-cov/universal-binary.c @@ -7,9 +7,18 @@ int main(int argc, const char *argv[]) {} // RUN: llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -filename-equivalence %s -arch x86_64 | FileCheck %s // RUN: llvm-cov export %S/Inputs/universal-binary -instr-profile %t.profdata -arch x86_64 2>&1 | FileCheck %S/Inputs/universal-binary.json +// 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 -filename-equivalence %s -arch i386 2>&1 | FileCheck --check-prefix=WRONG-ARCH %s // WRONG-ARCH: Failed to load coverage +// RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -filename-equivalence %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 -filename-equivalence %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! |

