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

Mark Brown mbrowncu98 at gmail.com
Thu Sep 8 12:07:12 PDT 2011


Now that they are added, how is this saved for later use?

The PrintFunctionNames example is ran by
     clang -cc1 -load ~/llvm/Release+Asserts/lib/libPrintFunctionNames.so
-plugin print-fns input_file.c

But how does this get stored/saved for the Pass phase? How do the new
contents of llvm.var.annotation get stored/saved? "-emit-llvm -S" does not
seem to help

Thanks again


On Thu, Sep 8, 2011 at 3:06 AM, John McCall <rjmccall at apple.com> wrote:

> On Sep 7, 2011, at 8:46 PM, Mark Brown wrote:
> > 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.
>
> Attr objects represent attributes.  You can add them to arbitrary Decls
> with Decl::addAttr().
>
> John.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110908/f6071824/attachment.html>


More information about the cfe-dev mailing list