[PATCH] D68578: [HIP] Fix device stub name

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 7 11:16:36 PST 2019


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





More information about the cfe-commits mailing list