Index: test/profile/coverage-path-test.cpp =================================================================== --- /dev/null +++ test/profile/coverage-path-test.cpp @@ -0,0 +1,10 @@ +// REQUIRES: shell +// RUN: mkdir -p %t/a/b +// RUN: cp %s %t/a/b/coverage-path-test.cpp +// RUN: %clang_profgen -fuse-ld=gold -O2 -fdata-sections -ffunction-sections -fcoverage-mapping -Wl,--gc-sections -o %t/a/b/coverage-path-test.exe %t/a/b/coverage-path-test.cpp +// RUN: env LLVM_PROFILE_FILE=%t/a/b/coverage-path-test.exe.profraw %run %t/a/b/coverage-path-test.exe +// RUN: llvm-profdata merge -o %t/a/b/coverage-path-test.exe.profdata %t/a/b/coverage-path-test.exe.profraw +// RUN: llvm-cov show %t/a/b/coverage-path-test.exe -instr-profile %t/a/b/coverage-path-test.exe.profdata -path-equivalence=%t/a,%t/a/b 2>&1 | FileCheck %s + +// CHECK: [[@LINE+1]]| 1|int main +int main(int argc, const char *argv[]) {}