Lorenzo Laneve via llvm-dev
2016-Mar-28 12:54 UTC
[llvm-dev] 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?
Jonathan Roelofs via llvm-dev
2016-Mar-28 14:34 UTC
[llvm-dev] Clang function naming conventions
On 3/28/16 6:54 AM, Lorenzo Laneve via llvm-dev wrote:> 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: http://llvm.org/devmtg/2014-10/Slides/Skip%20the%20FFI.pdf> > Another little question is, what's the function/method in the library which adds "llvm.ident" and "llvm.module.flags" to the module? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
Seemingly Similar Threads
- [LLVMdev] How to get the original function name in C++?
- [LLVMdev] Runtime introspection of "Release Mode" programs using LLVM or LLDB
- [LLVMdev] writing llvm ir not in c++
- [LLVMdev] How to get the original function name in C++?
- Passing structs in C calling convention