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

John McCall rjmccall at apple.com
Wed Sep 7 17:18:40 PDT 2011


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.



More information about the cfe-dev mailing list