[LLVMdev] clang change function name

Haopeng Liu hyliuhp at gmail.com
Sun Mar 1 20:38:39 PST 2015


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,



More information about the llvm-dev mailing list