attribute/annotation surviving for pass?

Hi

Im looking into Annotate Attribute and I’m having a rough time, lots of old and misc threads. Anyway, I’m specially trying to create a attribute/annotation in a RecursiveASTVisitor so I can later use it in a pass. Is this currently possible? Also, is the correct way to use them to still parse llvm.global.annotations manually? I’m not entirely sure what it would contain but could the contents be directly correlated to a VarDecl* or a Function*?

Thanks