<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 10:29 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><div>On Fri, Jan 4, 2013 at 10:23 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>

</div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra">
<br><div class="gmail_quote">
<div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><br>
> Any ideas how we can make these types of debug info tests<br>
> more understandable to future devs? My only idea is copious comments, but I<br>
> feel like having some self-documenting system would be better and I just<br>
> don't have any good ideas about what it would look like.<br>
<br>
</div>Yeah, I'm not sure what it would look like - essentially the test<br>
would have to reference constants from LLVM to describe the flags<br>
combined into the flags field. (&, better than that, the ability to<br>
specify just some part of the flags value that is of interest to a<br>
particular test)<br>
<br>
Probably just adding comments of the form:<br>
<br>
; test that the flags represent the 'protected' access modifier<br>
; 258 (flags) = 42 (thing1) | 157 (thing2) | (protected) 8<br>
<br>
(I haven't actually looked up what constants are combined into the<br>
flags value in this case)</blockquote><div><br></div></div><div>That would work, an option for more self-documentation would be to have the</div><div>debug output (e.g. [ DW_TAG_class_type ]) contain the access specifiers.</div>

</div></div></div></blockquote><div><br></div></div></div><div>Just brain storming: what about having the IR asm printer show the sorted |'ed set of flags in a comment?<br></div><div> </div></div></div></div></blockquote>
<div><br></div><div style>Well, yeah, that's what I was saying :)</div><div style><br></div><div style>-eric </div></div></div></div>