[cfe-dev] CodeGen and AnnotateAttr objects

Mark Brown mbrowncu98 at gmail.com
Tue Sep 13 17:27:02 PDT 2011


I'm trying to figure out how Clang's CodeGen deals with AnnotateAttr
objects. The only uses of "AnnotateAttr" I can find in the CodeGen directory
seem to point to CodeGenModule::EmitAnnotateAttr(). The comment here seems
to imply that this function will only handle AnnotateAttrs on GlobalValues.

How/where does it handle AnnotateAttrs on VarDecls, or even regular Decls?
I'm asking because I have added some AnnotateAttrs to VarDecls in a plugin,
had that plugin write out its AST file and then let clang compile it(with -S
-emit-llvm). There was no references to my string(used in the AnnotateAttrs)
or even of something like @llvm.var.annotation. So for some reason they are
not making it to the IR and I have no idea why.

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110913/7bf9a2d2/attachment.html>


More information about the cfe-dev mailing list