[PATCH] D41846: [DWARFv5] MC support for MD5 checksum
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 09:01:18 PST 2018
On Tue, Jan 9, 2018 at 8:46 AM Adrian Prantl via Phabricator <
reviews at reviews.llvm.org> wrote:
> aprantl added a comment.
>
> Thanks, looks mostly good.
>
>
>
> ================
> Comment at: llvm/include/llvm/MC/MCDwarf.h:56
> + /// The MD5 checksum, if there is one.
> + MD5::MD5Result *Checksum = nullptr;
> };
> ----------------
> Optional<MD5::MD5Result>?
>
Yeah, I'm a bit concerned about ownership/lifetime with all these pointers
too. If this remains a pointer, I'd like some more (comments/etc)
explanation of the lifetime guarantees/requirements.
>
>
> ================
> Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:3361
> + Checksum = fromHex(Checksum);
> + assert(Checksum.size() == 16);
> + CKMem = (MD5::MD5Result *)Ctx.allocate(sizeof(MD5::MD5Result), 1);
> ----------------
> I think I would feel more comfortable with a report_fatal_error on invalid
> inputs.
>
I'm assuming, this being the asm parser, there are good non-fatal error
handling paths to use?
>
>
> ================
> Comment at: llvm/test/MC/ELF/debug-md5.s:4
> + .file 1 "dir1/foo" md5 "00112233445566778899aabbccddeeff"
> + .file 2 "dir2" "bar" md5 "ffeeddccbbaa99887766554433221100"
> + .loc 1 1 0
> ----------------
> Just out of curiosity: why did you opt for a string literal instead of a
> hex numeral? Is there some precedent for that?
>
>
> https://reviews.llvm.org/D41846
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180109/2917f6f7/attachment.html>
More information about the llvm-commits
mailing list