share between AST and IR?

I wrote a plugin using ASTConsumer and RecursiveASTVisitor to find “interesting” variables and functions. I’m wonder if there is a way to save/flag/metadata these so later on at the IR level I can use this information in a Pass.

As far as I can tell nothing currently would allow me todo this and I’m wondering what exactly it would take to do something like this. After stairing at the ode for awhile I’m not even really sure where to begin or what the key files are.

Any advice?
Thanks you

Hi,
Isn’t clang::CodeGenOptions::EmitDeclMetadata what you need?
Vassil

I’m not finding much information on CodeGenOptions::EmitDeclMetadata() or -mno-red-zone. I’m not sure how this should be enabled or how I should use this. Do you know of a example or remember how you learned of this?

Thanks again and sorry for the late reply