<br><br><div>On Wed Jan 15 2014 at 6:17:50 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This patch implements the ability to distinguish between attributes<br>
explicitly written at the request of the user, and attributes<br>
implicitly generated to assist in bookkeeping by the compiler. It<br>
additionally removes the optional nature of the spelling list index<br>
when creating attributes. These two things go hand in hand because the<br>
spelling of the attribute is semantically important in some cases.<br>
<br>
All attributes now receive a table-generated factory function named<br>
CreateImplicit. This function creates a new instance of the attribute,<br>
and flags it as being implicitly created. This attribute is then<br>
inserted into the AST as normal, but consumers of the AST are able to<br>
check whether the attribute was implicitly generated, if it suits<br>
them. Currently, no AST consumer cares (outside of the AST dumper, for<br>
testing purposes), but the expectation is that this will change.
<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the attribute has distinct spellings (where distinct is defined as<br>
"differing in more than just spelling varieties and leading/trailing<br>
underscores), it also receives a Spelling enumeration. This allows<br>
spelling-specific implicit attributes to be created without relying on<br>
fragile mechanisms.<br></blockquote><div><br></div><div>This looks great, thanks!</div><div><br></div><div>It looks like this patch marks the AsmLabelAttr as always being implicit (but maybe I'm misreading). I don't think that's the best choice; it corresponds to something the user explicitly wrote in the source code, and is our only AST representation of that thing. (It should probably also be given a Keyword spelling.)</div>