<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 13, 2020 at 2:41 PM <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yikes, sorry I missed this as well.<br>
<br>
<a href="https://reviews.llvm.org/D78411" rel="noreferrer" target="_blank">https://reviews.llvm.org/D78411</a> introduced test changes which relied on the ability to strip debugify metadata even if module-level metadata is missing. This could use a more targeted test -- I've added one in e51c7fb842ee.<br></blockquote><div><br>Great! Could you update the test to test something more specific than "does anything other than crash" - I guess checking the output is empty?<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
vedant<br>
<br>
<br>
> On Jul 6, 2020, at 12:23 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> <br>
> Ping<br>
> <br>
> On Mon, Apr 27, 2020 at 9:15 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>> <br>
>> Should/could this have a test case?<br>
>> <br>
>> On Wed, Apr 22, 2020 at 5:05 PM Vedant Kumar via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>>> <br>
>>> <br>
>>> Author: Vedant Kumar<br>
>>> Date: 2020-04-22T17:03:39-07:00<br>
>>> New Revision: 2fa656cdfd836d5d3959466f05e44ae51bcded4e<br>
>>> <br>
>>> URL: <a href="https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e</a><br>
>>> DIFF: <a href="https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e.diff</a><br>
>>> <br>
>>> LOG: [Debugify] Do not require named metadata to be present when stripping<br>
>>> <br>
>>> This allows -mir-strip-debug to be run without -debugify having run<br>
>>> before.<br>
>>> <br>
>>> Added:<br>
>>> <br>
>>> <br>
>>> Modified:<br>
>>> llvm/lib/Transforms/Utils/Debugify.cpp<br>
>>> <br>
>>> Removed:<br>
>>> <br>
>>> <br>
>>> <br>
>>> ################################################################################<br>
>>> diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp<br>
>>> index f2739a8257a2..19c73f3840fc 100644<br>
>>> --- a/llvm/lib/Transforms/Utils/Debugify.cpp<br>
>>> +++ b/llvm/lib/Transforms/Utils/Debugify.cpp<br>
>>> @@ -224,7 +224,8 @@ bool llvm::stripDebugifyMetadata(Module &M) {<br>
>>> // Strip out the module-level Debug Info Version metadata.<br>
>>> // FIXME: There must be an easier way to remove an operand from a NamedMDNode.<br>
>>> NamedMDNode *NMD = M.getModuleFlagsMetadata();<br>
>>> - assert(NMD && "debugify metadata present without Debug Info Version set?");<br>
>>> + if (!NMD)<br>
>>> + return Changed;<br>
>>> SmallVector<MDNode *, 4> Flags;<br>
>>> for (MDNode *Flag : NMD->operands())<br>
>>> Flags.push_back(Flag);<br>
>>> <br>
>>> <br>
>>> <br>
>>> _______________________________________________<br>
>>> llvm-commits mailing list<br>
>>> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div></div>