Re: [PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-20 Thread Igor Kudrin via cfe-commits
ikudrin abandoned this revision. ikudrin added a comment. This change is not needed anymore because the whole issue was fixed in http://reviews.llvm.org/D20286. http://reviews.llvm.org/D20287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-18 Thread Igor Kudrin via cfe-commits
ikudrin added a comment. In http://reviews.llvm.org/D20287#431055, @davidxl wrote: > On the other hand, I wonder what is the real root cause of the problem. The > dummy function record does not have its 'own' profile counts, so > > if (std::error_code EC = ProfileReader.getFunctionCounts( >

Re: [PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-16 Thread David Li via cfe-commits
davidxl added a comment. Strictly speaking, this patch requires a version bump of the indexed format. The profile reader also needs to adjust the FunctionHash computation (either using 0 or simple function hash) based on the version of the profile data. Check with Justin/vsk to see if it is imp

Re: [PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-16 Thread Igor Kudrin via cfe-commits
ikudrin added a comment. Does anyone known, why we need dummy coverage mapping records for unused functions? How are they used? Isn't it better to remove these dummy records to prevent confusion with the real ones? http://reviews.llvm.org/D20287 _

Re: [PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-16 Thread Igor Kudrin via cfe-commits
ikudrin added a comment. The motivation sample (using llvm-cov with http://reviews.llvm.org/D20286 applied): $ cat > sample.h << EOF inline int sample_func(int A) { return A; } EOF $ cat > dummy.cpp << EOF #include "sample.h" EOF $ cat > sample.cpp << EOF #include "sample.h

[PATCH] D20287: [Coverage] Ensure that the hash for a used function is non-zero.

2016-05-16 Thread Igor Kudrin via cfe-commits
ikudrin created this revision. ikudrin added reviewers: bogner, davidxl, vsk. ikudrin added a subscriber: cfe-commits. A valid function might not have any statement which affects the hash value, so the hash for that function was zero. The hash value for an unused function is also zero, so the lo