[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?

Albert Graef Dr.Graef at t-online.de
Wed Jun 17 13:32:44 PDT 2009


A. Vuori wrote:
> ---bar.cpp----
> int bar() {
>     return 42;
> }
> --------------

Try extern "C" int bar() instead, then you get C binding and the name
mangling goes away.

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list