Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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() {}'
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | ||
---|---|---|
317 ↗ | (On Diff #217211) | 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. |
llvm/lib/ProfileData/InstrProfReader.cpp | ||
45 ↗ | (On Diff #217211) | Perhaps this could be a follow-up change? I'm not sure what it has to do with the main change. |
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.
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | ||
---|---|---|
317 ↗ | (On Diff #217211) | 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. |
llvm/lib/ProfileData/InstrProfReader.cpp | ||
45 ↗ | (On Diff #217211) | I will remove it. |
Thanks, it should be fine to ignore the payload of the data_not_found error.
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | ||
---|---|---|
317 ↗ | (On Diff #217211) | Sure, this should just create an error if ObjectFilenames is non-empty. |
Thanks for the review including some great suggestions.
I do not have a commit account. Could you commit this for me? Thanks again.