Skip to content

Commit 94eb8b3

Browse files
committed
[OpenMP][NFC] Use temporary instead of local to take advantage of move semantics
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.
1 parent 70e303f commit 94eb8b3

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
@@ -8397,9 +8397,8 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
83978397

83988398
// The information types are only built if provided.
83998399
if (!CombinedInfo.Names.empty()) {
8400-
std::string MapnamesName = createPlatformSpecificName({"offload_mapnames"});
8401-
auto *MapNamesArrayGbl =
8402-
createOffloadMapnames(CombinedInfo.Names, MapnamesName);
8400+
auto *MapNamesArrayGbl = createOffloadMapnames(
8401+
CombinedInfo.Names, createPlatformSpecificName({"offload_mapnames"}));
84038402
Info.RTArgs.MapNamesArray = MapNamesArrayGbl;
84048403
Info.EmitDebug = true;
84058404
} else {

0 commit comments

Comments
 (0)