[PATCH] D48135: [DWARFv5] Tolerate files not all having an MD5 checksum.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 13:09:48 PDT 2018


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM!



================
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);
----------------
probinson wrote:
> 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