<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 9, 2014 at 11:02 AM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Alexey Samsonov <<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> writes:<br>
> On Mon, Jun 9, 2014 at 9:02 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
>> Alexey Samsonov <<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> writes:<br>
>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Jun 5 18:10:19 2014<br>
>>> @@ -1220,6 +1220,11 @@ DwarfDebug::collectVariableInfo(SmallPtr<br>
>>> if (Begin->getNumOperands() > 1 && Begin->getOperand(0).isReg() &<br>
>>&<br>
>>> !Begin->getOperand(0).getReg())<br>
>>> continue;<br>
>>> + DEBUG(dbgs() << "DotDebugLoc Pair:\n" << "\t" << *Begin);<br>
>>> + if (End != nullptr)<br>
>>> + DEBUG(dbgs() << "\t" << *End);<br>
>><br>
>> Missed a newline here?<br>
><br>
> Should be fine, newline is inserted automatically when you print a<br>
> MachineInstruction.<br>
<br>
</div>Ok, then...<br>
<div class=""><br>
>>> + else<br>
>>> + DEBUG(dbgs() << "\tNULL\n");<br>
<br>
</div>should we remove the newline here?</blockquote><div><br></div><div>Why? If we print MachineInstr, it is followed by a newline automatically. If we are printing "NULL" manually,</div><div>we should print newline ourselves for consistency.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
>>> const MCSymbol *StartLabel = getLabelBeforeInsn(Begin);<br>
>>> assert(StartLabel && "Forgot label before DBG_VALUE starting a range!");<br>
>>> @@ -1233,8 +1238,6 @@ DwarfDebug::collectVariableInfo(SmallPtr<br>
>>> EndLabel = getLabelBeforeInsn(std::next(I)->first);<br>
>>> assert(EndLabel && "Forgot label after instruction ending a range!");<br>
>>><br>
>>> - DEBUG(dbgs() << "DotDebugLoc Pair:\n"<br>
>>> - << "\t" << *Begin << "\t" << *End << "\n");<br>
>>> DebugLocEntry Loc(StartLabel, EndLabel, getDebugLocValue(Begin), TheCU);<br>
>>> if (DebugLoc.empty() || !DebugLoc.back().Merge(Loc))<br>
>>> DebugLoc.push_back(std::move(Loc));<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div></div>