<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 10:33 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>> --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)<br>
>> +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed May 27 07:13:06 2015<br>
>> @@ -65,8 +65,9 @@ public:<br>
>>          AsmBackend(asmbackend), CommentStream(CommentToEmit),<br>
>>          IsVerboseAsm(isVerboseAsm), ShowInst(showInst),<br>
>>          UseDwarfDirectory(useDwarfDirectory) {<br>
>> -    if (InstPrinter && IsVerboseAsm)<br>
>> -      InstPrinter->setCommentStream(CommentStream);<br>
>> +    assert(InstPrinter);<br>
>> +    if (IsVerboseAsm)<br>
>> +        InstPrinter->setCommentStream(CommentStream);<br>
>>    }<br>
><br>
><br>
> Why the assert here?If there's a reason, why not in the other chunks too?<br>
<br>
</span>It is the constructor, so it is the first code path that gets hit.<br></blockquote><div><br>Could we take the parameter by reference instead of pointer?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>