<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 4, 2015 at 10:13 AM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks. I'm testing an update addressing your feedback. Some comments bellow:<br>
<span class=""><br>
<br>
================<br>
Comment at: include/llvm/DebugInfo/DWARFExpression.h:109<br>
@@ +108,3 @@<br>
+<br>
+    bool operator==(const iterator &I) const {<br>
+      return Expression == I.Expression && Offset == I.Offset;<br>
----------------<br>
</span><span class="">dblaikie wrote:<br>
> operator overloads that can be non-members generally should be (to allow symmetric conversions on LHS and RHS) - could define it inline as a friend if that's useful.<br>
</span>Yeah, but the iterator_facade that I'm using requires a member function to deriver != from ==. I added a couple of non-members operators that forward to the member ones.<br></blockquote><div><br>Reckon we can fix that to allow non-member versions?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
================<br>
Comment at: lib/DebugInfo/DWARFDebugLoc.cpp:34<br>
@@ +33,3 @@<br>
+                       Unit->getAddressByteSize());<br>
+    DWARFExpression(Data, Unit).Print(OS, false);<br>
+  }<br>
----------------<br>
</span><span class="">dblaikie wrote:<br>
> what's the boolean? ('false')<br>
><br>
> (could use a comment, maybe, or an enum, etc)<br>
</span>It decides wether to use the standard or the EH register mapping. We never use the EH mapping for now, but I thought I'd thread it through anyway. I've changed that to a enum with a default value.<br></blockquote><div><br>Generally I wouldn't bother adding extra code for a use case we don't have yet, since it'll be dead/untested code.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
================<br>
Comment at: test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll:12<br>
@@ -11,2 +11,3 @@<br>
 ; CHECK-NEXT:   DW_AT_location<br>
-; CHECK-NEXT:   DW_AT_name {{.*}} "z_s"<br>
+; CHECK-NOT: DW_TAG<br>
+; CHECK:   DW_AT_name {{.*}} "z_s"<br>
----------------<br>
</span><span class="">dblaikie wrote:<br>
> Maybe CHECK-NOT: DW_{{TAG|AT}} ? I assume this was here so we didn't skip any extra attributes on this TAG.<br>
</span>I changed that to match the old test, although I'm not sure their is any value in checking the ordering of the attributes within a TAG.<br></blockquote><div><br>IIRC/I suspect it's not so much testing for the ordering of the attributes, but testing for the existence of certain attributes and ensuring no other attributes are expected. But maybe not - this test predates my work on debug info by a few years.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
================<br>
Comment at: test/DebugInfo/X86/debug-loc-offset.ll:50<br>
@@ -49,1 +49,3 @@<br>
+; do not check the location stored here, as it will be offseted by the<br>
+; compile unit's low_pc. The real check is below in the debug_loc section.<br>
 ; CHECK-NOT: DW_TAG<br>
----------------<br>
</span><span class="">dblaikie wrote:<br>
> Not sure I follow why the low_pc offset would be problematic - it'll always be zero in a single-CU file, right?<br>
</span>This is the whole point of this test. It's a multi-cu test that verifies that the location entries are stored relatively to the low_pc of the unit. The test is that the location's base address should be 0. When it is displayed inline the offset is applied - which is a good thing - but it's not what we want to test. So I defer the test to the raw dump of the debug_lc section bellow.<br>
The comment shouldn't read 'stored here' though, 'deployed here' would be more accurate.<br></blockquote><div><br>I think I'm roughly seeing that.<br> </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>
<a href="http://reviews.llvm.org/D6771" target="_blank">http://reviews.llvm.org/D6771</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>