yaxunl added a comment.

In D68578#1700652 <https://reviews.llvm.org/D68578#1700652>, @tra wrote:

> This patch proposes changing the source-level name for the stub. 
> Unfortunately the way it attempt to implement it is by doing the renaming 
> during mangling phase itself. This appears to be the wrong place to change 
> source-level name.


A specific difficulty here is that we need not only get the mangled kernel stub 
name, but also get the mangled kernel name. However, there is only one FuncDecl 
for the kernel. If we change the name of the FuncDecl to the stub name to be 
different from the kernel name, then we cannot get the mangled name for the 
kernel. That's why this patch does not change FuncDecl but let the mangler 
mangle it in two different ways. An alternative approach would be to create two 
FuncDecls, one for stub, one for kernel, and keep a map from the stub to the 
kernel. In this way we do not need to change the mangler.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68578/new/

https://reviews.llvm.org/D68578



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

Reply via email to