honggyu.kim added a comment.

In https://reviews.llvm.org/D22666#506884, @compnerd wrote:

> The `\01` is to prevent the mangler from touching the function name.  If you 
> noticed the check tags in the quoted test, some targets expect it to be 
> decorated and others do not.  What exactly do you mean that `lit` has a 
> strings matching with `\01`?  Its not a string `\01`, its the octal character 
> 1.


Hi Saleem,

It seems that name mangling is done before mcount call insertion so I think we 
don't have to put `\01` prefix for mcount names.  I have tested on x86-64 and 
ARM.  Are there any other targets that work in a different order?
I've checked this `clang::CodeGen::CodeGenModule::getMangledName()` is always 
executed before `clang::CodeGen::CodeGenFunction::StartFunction()`, which 
actually inserts mcount calls.
Please correct me if I'm wrong


https://reviews.llvm.org/D22666



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to