[cfe-commits] r171604 - /cfe/trunk/test/CodeGenCXX/debug-info-method.cpp

Eric Christopher echristo at gmail.com
Fri Jan 4 22:43:16 PST 2013


On Fri, Jan 4, 2013 at 10:29 PM, Chandler Carruth <chandlerc at google.com>wrote:

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

Well, yeah, that's what I was saying :)

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130104/cf55ea94/attachment.html>


More information about the cfe-commits mailing list