search for: _z19

Displaying 2 results from an estimated 2 matches for "_z19".

2015 Mar 02
2
[LLVMdev] clang change function name
Hi, I compile a .cpp with cmd: clang++ -emit-llvm -c -g -O0 -w pbzip2.cpp -o pbzip2.bc -lbz2 llvm-dis pbzip2.bc One function in .cpp is consumer_decompress. However, I look inside pbzip2.ll. The function name is changed to "define i8* @_Z19consumer_decompressPv(i8* %q) #0 {" Why clang adds a "_Z19" prefix and "Pv" suffix? Thanks,
2015 Mar 02
2
[LLVMdev] clang change function name
...t;> I compile a .cpp with cmd: >> clang++ -emit-llvm -c -g -O0 -w pbzip2.cpp -o pbzip2.bc -lbz2 >> llvm-dis pbzip2.bc >> >> One function in .cpp is consumer_decompress. However, I look inside >> pbzip2.ll. The function name is changed to "define i8* >> @_Z19consumer_decompressPv(i8* %q) #0 {" >> >> Why clang adds a "_Z19" prefix and "Pv" suffix? > > Clang mangles the name so that the function's name encodes the name > and the function's type; this helps the linker link C++ object files > togeth...