[cfe-commits] [PATCH] Delayed parsing for GNU attributes

Delesley Hutchins delesley at google.com
Fri Sep 2 11:25:43 PDT 2011


Updated patch which fixes a few coding style issues.

On Thu, Sep 1, 2011 at 1:40 PM, Delesley Hutchins <delesley at google.com> wrote:
> This patch implements delayed parsing for GNU attributes.  The main
> motivation for this patch is to implement thread safety attributes,
> such as the following:
>
> class Foo {
>  int x __attribute__((guarded_by(mu)));
>  int foo() __attribute__((exclusive_locks_required(mu)));
>  Mutex mu;
> }
>
> Delayed parsing is now turned on for any GNU attribute that specifies
> LateParsed=1 in Attr.td.  Note that support for delayed parsing is
> incomplete, in that it is only enabled for attributes at the end of a
> member declaration; this is due to a limitation in the current
> implementation that we hope to remove at some point.
>
> Patches for llvm and clang are attached, and can also be found at:
>
>  http://codereview.appspot.com/4975048/
>  http://codereview.appspot.com/4975049/
>
> Cheers,
>
> DeLesley Hutchins and Caitlin Sadowski
>
> --
> DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315
>



-- 
DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generalized_late_attribute_full2.patch
Type: text/x-patch
Size: 34973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110902/e3215bae/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generalized_late_attribute_tablegen2.patch
Type: text/x-patch
Size: 3573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110902/e3215bae/attachment-0001.bin>


More information about the cfe-commits mailing list