<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 9, 2018 at 8:46 AM Adrian Prantl via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl added a comment.<br>
<br>
Thanks, looks mostly good.<br>
<br>
<br>
<br>
================<br>
Comment at: llvm/include/llvm/MC/MCDwarf.h:56<br>
+  /// The MD5 checksum, if there is one.<br>
+  MD5::MD5Result *Checksum = nullptr;<br>
 };<br>
----------------<br>
Optional<MD5::MD5Result>?<br></blockquote><div><br>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.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
================<br>
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:3361<br>
+      Checksum = fromHex(Checksum);<br>
+      assert(Checksum.size() == 16);<br>
+      CKMem = (MD5::MD5Result *)Ctx.allocate(sizeof(MD5::MD5Result), 1);<br>
----------------<br>
I think I would feel more comfortable with a report_fatal_error on invalid inputs.<br></blockquote><div><br>I'm assuming, this being the asm parser, there are good non-fatal error handling paths to use?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
================<br>
Comment at: llvm/test/MC/ELF/debug-md5.s:4<br>
+        .file 1 "dir1/foo"   md5 "00112233445566778899aabbccddeeff"<br>
+        .file 2 "dir2" "bar" md5 "ffeeddccbbaa99887766554433221100"<br>
+        .loc 1 1 0<br>
----------------<br>
Just out of curiosity: why did you opt for a string literal instead of a hex numeral? Is there some precedent for that?<br>
<br>
<br>
<a href="https://reviews.llvm.org/D41846" rel="noreferrer" target="_blank">https://reviews.llvm.org/D41846</a><br>
<br>
<br>
<br>
</blockquote></div></div>