[cfe-dev] using CodeGenOptions::EmitDeclMetadata()?
rjmccall at apple.com
Mon Jul 25 10:34:18 PDT 2011
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.
More information about the cfe-dev