How to add LLVM IR metadata from a Clang Plugin?

I want to pass some AST information from Clang to LLVM and extensible
metadata (http://blog.llvm.org/2010/04/extensible-metadata-in-llvm-ir.html)
seems the right way to do that. Is it possible to add metadata to the
generated IR from a "PrintFunctionNames"-like plugin? Some pointers or
code examples?

I'm aware that the plugin mechanism may improve in the near future
(http://comments.gmane.org/gmane.comp.compilers.clang.devel/17707),
I'd like to know if it's possible (and not very difficult) to do it
with current infrastructure.

Thanks,

It’s not possible currently.

Nico

Thanks Nico.