[clang] b3634d3 - Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified."

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 21 13:23:58 PDT 2021


Author: Erich Keane
Date: 2021-06-21T13:23:52-07:00
New Revision: b3634d3e88b7f26534a5057bff182b7dced584fc

URL: https://github.com/llvm/llvm-project/commit/b3634d3e88b7f26534a5057bff182b7dced584fc
DIFF: https://github.com/llvm/llvm-project/commit/b3634d3e88b7f26534a5057bff182b7dced584fc.diff

LOG: Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified."

This reverts commit 5013131875402539a249dca47c58cca7c359baf8.

This patch didn't end up being the solution to the problem.  It "fixed"
our issue but the actual correct solution is something else.  Reverting
as this ends up being unnecessary/extra noise.

Added: 
    

Modified: 
    clang/lib/Sema/SemaSYCL.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaSYCL.cpp b/clang/lib/Sema/SemaSYCL.cpp
index 7ae78b1d1943..3b48a53efc0d 100644
--- a/clang/lib/Sema/SemaSYCL.cpp
+++ b/clang/lib/Sema/SemaSYCL.cpp
@@ -54,14 +54,14 @@ bool Sema::checkSYCLDeviceFunction(SourceLocation Loc, FunctionDecl *Callee) {
 // this was passed by value, and in SYCL2020, it is passed by reference.
 static QualType GetSYCLKernelObjectType(const FunctionDecl *KernelCaller) {
   assert(KernelCaller->getNumParams() > 0 && "Insufficient kernel parameters");
-  // SYCL 1.2.1
   QualType KernelParamTy = KernelCaller->getParamDecl(0)->getType();
 
   // SYCL 2020 kernels are passed by reference.
   if (KernelParamTy->isReferenceType())
-    KernelParamTy = KernelParamTy->getPointeeType();
+    return KernelParamTy->getPointeeType();
 
-  return KernelParamTy.getUnqualifiedType();
+  // SYCL 1.2.1
+  return KernelParamTy;
 }
 
 void Sema::AddSYCLKernelLambda(const FunctionDecl *FD) {


        


More information about the cfe-commits mailing list