revert r354615: [HIP] change kernel stub name
It caused regressions.
Differential Revision: https://reviews.llvm.org/D58518
llvm-svn: 354651
diff --git a/clang/lib/CodeGen/CGCUDANV.cpp b/clang/lib/CodeGen/CGCUDANV.cpp
index 6f7295b..6266103 100644
--- a/clang/lib/CodeGen/CGCUDANV.cpp
+++ b/clang/lib/CodeGen/CGCUDANV.cpp
@@ -227,12 +227,6 @@
emitDeviceStubBodyNew(CGF, Args);
else
emitDeviceStubBodyLegacy(CGF, Args);
-
- // Postfix kernel stub names with .stub to differentiate them from kernel
- // names in device binaries. This is to facilitate the debugger to find
- // the correct symbols for kernels in the device binary.
- if (CGF.getLangOpts().HIP)
- CGF.CurFn->setName(CGF.CurFn->getName() + ".stub");
}
// CUDA 9.0+ uses new way to launch kernels. Parameters are packed in a local
diff --git a/clang/test/CodeGenCUDA/device-stub.cu b/clang/test/CodeGenCUDA/device-stub.cu
index 3be0e7b..387a787 100644
--- a/clang/test/CodeGenCUDA/device-stub.cu
+++ b/clang/test/CodeGenCUDA/device-stub.cu
@@ -145,8 +145,7 @@
// Test that we build the correct number of calls to cudaSetupArgument followed
// by a call to cudaLaunch.
-// CUDA-LABEL: define{{.*}}kernelfunc
-// HIP-LABEL: define{{.*}}@_Z10kernelfunciii.stub
+// LNX: define{{.*}}kernelfunc
// New launch sequence stores arguments into local buffer and passes array of
// pointers to them directly to cudaLaunchKernel