[cfe-dev] using CodeGenOptions::EmitDeclMetadata()?
retval386 at gmail.com
Mon Jul 25 10:46:54 PDT 2011
Only global declarations? Thats not good...
I need some simple way of marking function pointers and functions at the AST
level(with a Plugin) and having it survive to the IR level(as a Pass).
On Mon, Jul 25, 2011 at 1:34 PM, John McCall <rjmccall at apple.com> wrote:
> On Jul 25, 2011, at 7:31 AM, ret val wrote:
> > Does anyone know how to take advantage of this? The header file has a
> comment that reads "Only useful when running CodeGen as a subroutine", I
> would like to use this feature in a Pass and don't know where to begin.
> > Is there example code somewhere?
> LLDB uses it; you can check out their code and see the details.
> Essentially, if you set the flag, alloca instructions and global
> declarations will be marked with a metadata whose argument is the integral
> value of some corresponding Decl*. I would not count on this information
> surviving arbitrary optimizations, though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev