Commit Graph

7 Commits

Author SHA1 Message Date
Hamish Knight
9dc2d04352 [test] A couple of minor changes 2023-05-22 17:54:18 +01:00
Hamish Knight
b55f97250d [IRGen] Update coverage mapping for version 6
The coverage format version we use is automatically
set to whatever the latest version LLVM has. This
resulting in us outputting version 6 as our
format without having made the changes necessary
to reflect the new format. Update the emission
logic to take account for [the new changes in
version 6][1] (we need to include the current
working directory as the first element of the list
of files we output). Additionally, add a
`static_assert` so we don't get caught out by
version bumps in the future. Note we can't pin our
version, as it must stay in sync with the version
Clang is using.

[1]: https://llvm.org/docs/CoverageMappingFormat.html#llvm-ir-representation
2023-05-20 00:32:21 +01:00
Keith Smiley
4b219f5c60 Improve coverage test naming 2020-06-17 14:23:25 -07:00
Keith Smiley
19477fd4b7 swap to echo to work on windwos 2020-06-17 10:45:55 -07:00
Keith Smiley
48f9f2d06b Use %t 2020-06-17 10:24:38 -07:00
Keith Smiley
9e4f17bb61 Fix coverage test on Windows
Relying on $PWD made this invalid on Windows
2020-06-17 10:01:49 -07:00
Keith Smiley
1b77448d37 Add path remapping with -coverage-prefix-map to coverage data
Previously the path to covered files in the __LLVM_COV / __llvm_covmap
section were absolute. This made remote builds with coverage information
difficult because all machines would have to have the same build root.
This change uses the values for `-coverage-prefix-map` to remap files in
the coverage info to relative paths. These paths work correctly with
llvm-cov when it is run from the same source directory as the
compilation, or from a different directory using the `-path-equivalence`
argument.

This is analogous to this change in clang https://reviews.llvm.org/D81122
2020-06-15 17:38:34 -07:00