rjmccall added a comment.

In D68578#1737415 <https://reviews.llvm.org/D68578#1737415>, @yaxunl wrote:

> In D68578#1737351 <https://reviews.llvm.org/D68578#1737351>, @rjmccall wrote:
>
> > Distinguishing between multiple symbols associated with the same 
> > source-level declaration is the purpose of the GlobalDecl abstraction.
>
>
> It seems GlobalDecl is just a wrapper for concrete Decl's


It's a `Decl` plus a discriminator which is required for certain kinds of 
declaration.  See e.g. `GlobalDecl(const CXXConstructorDecl *D, CXXCtorType 
Type)`.  `GlobalDecl` asserts if you try to construct it using 
`GlobalDecl(FunctionDecl*)` with a constructor/destructor declaration; we could 
similarly make that forbid construction with a kernel and then require code to 
use a `GlobalDecl` constructor that passes down whether it's the kernel or the 
stub that's being requested.

John.


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