IR metadata code generation

Hello,
Which files of libcodegen take care of generating llvm metadata nodes? which methods in particular? I am talking of metadata like that:

; Some unnamed metadata nodes, which are referenced by the named metadata.
!0 = metadata !{metadata !“zero”}
!1 = metadata !{metadata !“one”}
!2 = metadata !{metadata !“two”}
; A named metadata.
!name = !{!0, !1, !2}

Thank you very much

There are different uses for metadata. grep the clang sources for
getOrInsertNamedMetadata, which is a llvm::Module method. Debug
metadata (the thing Clang generates with -g) is created by using the
DIBuilder class (for example in lib/CodeGen/CGDebugInfo.cpp).

Eli