[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 2 11:29:13 PDT 2019


rjmccall added a comment.

I think it would be more reasonable to just change `getDeclLanguageLinkage` to check for a kernel function.



================
Comment at: lib/AST/Decl.cpp:2940
+  if (hasAttr<OpenCLKernelAttr>())
+    return true;
   return isDeclExternC(*this);
----------------
Both of these changes should be unnecessary because they ultimately defer to `isInExternCContext`.

I assume that OpenCL bans making a class member function a kernel?


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

https://reviews.llvm.org/D60454





More information about the cfe-commits mailing list