diff --git a/llvm/lib/SYCL/InSPIRation/InSPIRation.cpp b/llvm/lib/SYCL/InSPIRation/InSPIRation.cpp index 93e4a1a74994..3fe37a2ba8f4 100644 --- a/llvm/lib/SYCL/InSPIRation/InSPIRation.cpp +++ b/llvm/lib/SYCL/InSPIRation/InSPIRation.cpp @@ -244,7 +244,7 @@ struct InSPIRation : public ModulePass { /// changing all the names to a SHA-1 hash. Like asking for an update /// to the xocc compiler to accept characters that appear in mangled /// names - F.setName(std::to_string(uuidHashValue)); + F.setName("x" + std::to_string(uuidHashValue)); } /// Add metadata for the SPIR 2.0 version diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index c70e8f9d2114..8ab0beadddc1 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -116,7 +116,7 @@ static std::string getUniqueName(const char *KernelName) { boost::hash uuid_hasher; std::size_t uuid_hash_value = uuid_hasher(udoc); - return std::to_string(uuid_hash_value); + return "x" + std::to_string(uuid_hash_value); } cl_kernel ProgramManager::getOrCreateKernel(OSModuleHandle M,