[cfe-dev] Programatically obtaining section/offset information for function/constructor declarations found during AST traversal

Csaba Raduly via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 28 00:52:52 PDT 2015

Hi Sanee,

I doubt this is possible.
At the time you're walking through the AST, code has not been generated yet.

On Mon, Sep 28, 2015 at 12:29 AM, Sanee Berlow via cfe-dev  wrote:
> Hey everyone.
> I'm using ASTVisitor to walk through an AST to find constructors
> belonging to a certain type. What I want to do now is find the
> section/offset information for those found constructors that will be
> written to the output object file, allowing me to locate the binary
> for the constructors in the file. Is it possible to get that
> information programatically? What would be the best way to go about
> this?

GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

More information about the cfe-dev mailing list