[PATCH] D12614: [OpenMP] Offloading descriptor registration and device codegen.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 23 21:08:29 PDT 2015


sfantao added a comment.

Hi John,

Thanks for the remark!

In http://reviews.llvm.org/D12614#272354, @rjmccall wrote:

> CurFuncDecl is supposed to be the enclosing user function.  Things like outlined functions should be getting stored in CurCodeDecl; that's how it's done for blocks and lambdas.


Apologies I was not accurate in my previous post. `CurFuncDecl` is in fact the declaration of the enclosing user function. What is not defined in some times undefined is `CurGD` and this is what I was trying to use to get the right mangled name of the user function, given that it also encodes the structor type. So my question is: is there a good/safe way to get the mangled  name of the user function given the function declaration? I didn't find any good way to do that without replicating part of the stuff that happens in the mangler.

Just a little bit of context. The reason I was relying on the mangled name (along with source information) to unequivocally identify a target region is that it seemed as the most straightforward way to differentiate between different instances of the same template function/aggregate. So if you are aware of a different/easier way to accomplish the same goal please let me know.

Thanks again!
Samuel


http://reviews.llvm.org/D12614





More information about the cfe-commits mailing list