[cfe-commits] Threadsafety: delayed parsing patch

Caitlin Sadowski supertri at google.com
Mon Aug 29 13:54:16 PDT 2011

> I'd prefer that "LateParsed" be a property that can be specified for an attribute in the TableGen file, and that the late-parsing logic be hoisted out of the thread-safe-attribute parsing logic and into the general attribute-parsing logic. I expect that this would be both cleaner and more general, and it also gives you a great way to test the delayed parsing: just tweak your code to handle *every* attribute with delayed parsing, run the test suite, and see what breaks.
> Did you consider this generalization before?

No, we did not consider the generalization, but I like the idea. Note
that we will still need to special case parsing for thread safety
attributes, since we need to parse the arguments as an expression
list. However, we should be able to refactor out the main parse loop
(including delayed parsing) to a shared method.

Should we commit this patch and then commit a refactoring patch on top
of it, or change this patch?



More information about the cfe-commits mailing list