diff --git a/offload/plugins-nextgen/common/include/PluginInterface.h b/offload/plugins-nextgen/common/include/PluginInterface.h index fbc798faec24b..b5addc13d6644 100644 --- a/offload/plugins-nextgen/common/include/PluginInterface.h +++ b/offload/plugins-nextgen/common/include/PluginInterface.h @@ -317,7 +317,7 @@ struct GenericKernelTy { AsyncInfoWrapperTy &AsyncInfoWrapper) const = 0; /// Get the kernel name. - const char *getName() const { return Name; } + const char *getName() const { return Name.c_str(); } /// Get the kernel image. DeviceImageTy &getImage() const { @@ -413,7 +413,7 @@ struct GenericKernelTy { } /// The kernel name. - const char *Name; + std::string Name; /// The image that contains this kernel. DeviceImageTy *ImagePtr = nullptr; diff --git a/offload/plugins-nextgen/common/src/PluginInterface.cpp b/offload/plugins-nextgen/common/src/PluginInterface.cpp index ac7031b6e881c..81b9d423e13d8 100644 --- a/offload/plugins-nextgen/common/src/PluginInterface.cpp +++ b/offload/plugins-nextgen/common/src/PluginInterface.cpp @@ -456,7 +456,7 @@ Error GenericKernelTy::init(GenericDeviceTy &GenericDevice, KernelEnvironment = KernelEnvironmentTy{}; DP("Failed to read kernel environment for '%s' Using default Bare (0) " "execution mode\n", - Name); + getName()); } // Max = Config.Max > 0 ? min(Config.Max, Device.Max) : Device.Max;