Skip to content

Commit 1e838fe

Browse files
shafikgithub-actions[bot]
authored andcommitted
Automerge: [OpenMP][NFC] Use temporary instead of local to take advantage of move semantics (#138582)
Static analysis flagged `MapnamesName` because we could move it into `createOffloadMapnames`. I just replaced the local with a direct call to `createPlatformSpecificName` at the function argument location.
2 parents bda4354 + c956ed0 commit 1e838fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8378,9 +8378,8 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
83788378

83798379
// The information types are only built if provided.
83808380
if (!CombinedInfo.Names.empty()) {
8381-
std::string MapnamesName = createPlatformSpecificName({"offload_mapnames"});
8382-
auto *MapNamesArrayGbl =
8383-
createOffloadMapnames(CombinedInfo.Names, MapnamesName);
8381+
auto *MapNamesArrayGbl = createOffloadMapnames(
8382+
CombinedInfo.Names, createPlatformSpecificName({"offload_mapnames"}));
83848383
Info.RTArgs.MapNamesArray = MapNamesArrayGbl;
83858384
Info.EmitDebug = true;
83868385
} else {

0 commit comments

Comments
 (0)