[cfe-dev] manipulating @llvm.var.annotation in AST?

Mark Brown mbrowncu98 at gmail.com
Wed Sep 7 20:46:11 PDT 2011


I do not see any kind of AnnotateAttr object in VarDecl or anything it
inherits, and I also dont see where AnnotateAttr inherits something for it
to be inserted into the AST.

How exactly do you add a AnnotateAttr? What is it added to?

Thank you for the reply

On Wed, Sep 7, 2011 at 8:18 PM, John McCall <rjmccall at apple.com> wrote:

> On Sep 7, 2011, at 5:05 PM, Mark Brown wrote:
> > Is there anyway to manipulate @llvm.var.annotation at the AST level?
> >
> > In the source file you could do something like
> >         __attribute__((annotate("
> > GlobalValAnnotation")));
>
> This becomes an AnnotateAttr on the VarDecl.  There's nothing stopping you
> from adding this to an AST, as long as you obey the syntactic constraints on
> the operand.
>
> John.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110907/d86b46bd/attachment.html>


More information about the cfe-dev mailing list