[PATCH] D41846: [DWARFv5] MC support for MD5 checksum
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 08:46:35 PST 2018
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>?
================
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.
================
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
More information about the llvm-commits
mailing list