[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.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 13:31:18 PDT 2019
vsk added a comment.
Thanks for the patch. I'd like for the test to be minimized as far as possible, e.g.:
obj1.o: not instrumented, no functions
obj2.o: instrumented, just contains 'void f1() {}'
================
Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:317
+ }
+ }
for (auto &Reader : CoverageReadersOrErr.get())
----------------
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.
================
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());
----------------
Perhaps this could be a follow-up change? I'm not sure what it has to do with the main change.
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