File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -452,11 +452,9 @@ ur_result_t urProgramLinkExp(
452452 // Build flags may be different for different devices, so handle them
453453 // here. Clear values of the previous device first.
454454 BuildFlagPtrs.clear ();
455- std::vector<std::string> TemporaryOptionsStrings;
456455 for (uint32_t I = 0 ; I < count; I++) {
457- TemporaryOptionsStrings.push_back (
458- phPrograms[I]->getBuildOptions (ZeDevice));
459- BuildFlagPtrs.push_back (TemporaryOptionsStrings.back ().c_str ());
456+ BuildFlagPtrs.push_back (
457+ phPrograms[I]->getBuildOptions (ZeDevice).c_str ());
460458 }
461459 ZeExtModuleDesc.pBuildFlags = BuildFlagPtrs.data ();
462460 if (count == 1 )
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ struct ur_program_handle_t_ : _ur_object {
169169 DeviceDataMap[ZeDevice].BuildFlags += Options;
170170 }
171171
172- std::string getBuildOptions (ze_device_handle_t ZeDevice) {
172+ std::string & getBuildOptions (ze_device_handle_t ZeDevice) {
173173 return DeviceDataMap[ZeDevice].BuildFlags ;
174174 }
175175
You can’t perform that action at this time.
0 commit comments