[PATCH] D66763: Ignore object files that lack coverage information. Before this change, if multiple binary files were presented, all of them must have been instrumented or the load would fail with coverage_map_error::no_data_found.
Dean Sturtevant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 14:11:03 PDT 2019
deansturtevant marked 2 inline comments as done.
deansturtevant added a comment.
We can simplify by not propagating data_not_found, but rather manufacturing one if desired.
However, that would result in any information in the original payload being lost.
Let me know if that is ok.
================
Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:317
+ }
+ }
for (auto &Reader : CoverageReadersOrErr.get())
----------------
vsk wrote:
> Could you simply check whether 'Readers' is empty after the loop, and return data_not_found if so? Then there's no need to update an Error object.
That would change the logic so that passing in an empty ObjectFilenames would result in a data_not_found error. I'm not convinced that's the desired behavior, but would be willing to implement it if you think it is.
Please let me know what your preference is.
================
Comment at: llvm/lib/ProfileData/InstrProfReader.cpp:45
if (std::error_code EC = BufferOrErr.getError())
- return errorCodeToError(EC);
+ return createFileError(Path, EC);
return std::move(BufferOrErr.get());
----------------
vsk wrote:
> Perhaps this could be a follow-up change? I'm not sure what it has to do with the main change.
I will remove it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66763/new/
https://reviews.llvm.org/D66763
More information about the llvm-commits
mailing list