Clang function naming conventions

Hi everyone, I took a look at the IR modules clang generates, and how clang translates functions in C++ namespace and classes.
I've understood how it works for namespace but is there a file or a documentation that explains how Clang translates namespaces and classes in the IR modules?
If this becomes a convention all the front-end languages will be able to create functions available to other front-end languages.

Another little question is, what's the function/method in the library which adds "llvm.ident" and "llvm.module.flags" to the module?

Hi everyone, I took a look at the IR modules clang generates, and how clang translates functions in C++ namespace and classes.
I've understood how it works for namespace but is there a file or a documentation that explains how Clang translates namespaces and classes in the IR modules?

This is the reference for Itanium-ish targets: https://mentorembedded.github.io/cxx-abi/abi.html#mangling

If this becomes a convention all the front-end languages will be able to create functions available to other front-end languages.

It's a sure bet that each language will need its own mangling scheme. The "state of the art" in this space is to just skip having an FFI, and instead embed Clang in your language's frontend: