[PATCH] D48135: [DWARFv5] Tolerate files not all having an MD5 checksum.
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 12:27:04 PDT 2018
probinson marked an inline comment as done.
probinson added inline comments.
================
Comment at: llvm/include/llvm/MC/MCDwarf.h:255
Header.RootFile.Source = Source;
- Header.HasMD5 = (Checksum != nullptr);
+ Header.HasAnyMD5 |= bool(Checksum);
+ Header.HasAllMD5 &= bool(Checksum);
----------------
JDevlieghere wrote:
> How do you feel about a convenience method that takes the header and checksum pointer and updates both?
What, because the same code is in 4 places and I already made mistakes updating all 4 consistently, I should factor them into a common method? You're right!
After which it really made sense to make them private fields and bury all of it behind an API for proper data hiding.
https://reviews.llvm.org/D48135
More information about the llvm-commits
mailing list