<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 26, 2017 at 2:09 PM Simon Que 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">sque added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:85<br class="gmail_msg">
+    OS << "  Column: " << Info.Column << "\n";<br class="gmail_msg">
+    OS << "  Discriminator: " << Info.Discriminator << "\n";<br class="gmail_msg">
+  } else {<br class="gmail_msg">
----------------<br class="gmail_msg">
dblaikie wrote:<br class="gmail_msg">
> sque wrote:<br class="gmail_msg">
> > Should this be marked as DWARF-only, or placed in a DWARF-only section?<br class="gmail_msg">
> I'm /guessing/ (though you can probably reproduce this by running -verbose on a checked in COFF/CodeView file - I assume/imagine we have some of those in the dumper testing) that the Discriminator is 0 when not provided?<br class="gmail_msg">
><br class="gmail_msg">
> Perhaps it'd be easy enough to not print it when it's zero? If that works/you can confirm CodeView is doing what I assume it is - add a test? (for either CV, or a case a zero or not present discriminator in ELF).<br class="gmail_msg">
I am not familiar with possible values of the discriminator. Does discriminator == 0 mean it's invalid? Could it have a valid value of 0?<br class="gmail_msg"></blockquote><div><br>I'm not 100% sure either - just looked it up in the DWARF4 spec and it says "Where only one
block exists for a given source position, the discriminator value should be
zero. " - so, yes, seems it's default value of zero is the same as not-present, basically.<br><br>So, yes, happy to not print it if it's zero to make it more terse in general and avoid confusion when dumping on platforms that don't have a discriminator at all.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D29094" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D29094</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>