diff options
author | Yuhao Gu <yhgu2000@outlook.com> | 2023-08-15 00:36:54 +0000 |
---|---|---|
committer | Gulfem Savrun Yeniceri <gulfem@google.com> | 2023-08-15 02:51:28 +0000 |
commit | f8ad86c23405168a8cd189590184fdcc296627e0 (patch) | |
tree | 794bc25062b2a57d7a2c4b51fc3518aa9c20fb0b /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 2660fef880190f2895490414d89265134a0732a0 (diff) | |
download | llvm-f8ad86c23405168a8cd189590184fdcc296627e0.zip llvm-f8ad86c23405168a8cd189590184fdcc296627e0.tar.gz llvm-f8ad86c23405168a8cd189590184fdcc296627e0.tar.bz2 |
[llvm-cov] Fix a bug about using `convert-for-testing` on multi-source object files
`llvm-cov convert-for-testing` is used to build the .covmapping files used in its regression tests. However the current implementation only works when there's only one source file in the mapping information data. If there are more than 1 source files, `llvm-cov convert-for-testing` can still produce a .covmapping file, but when read it back, `llvm-cov` will report:
```
error: Failed to load coverage: 'main.covmapping': Malformed coverage data
```
This is because the output .covmapping file doesn't have any mark to indicate the boundary between file records and function records, and current implementation jsut assume there's only one file record in the .covmapping file.
Changes to the code:
- Make `llvm-cov convert-for-testing` output a LEB128 number before file records to indicate its size.
- Change the testing format parsing code correspondingly.
- Update existing .covmapping files.
Reviewed By: gulfem
Differential Revision: https://reviews.llvm.org/D156611
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions