Skip to content

Commit 0384f09

Browse files
committed
[AMDGPU] Update to use SmallString
1 parent f73d58c commit 0384f09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AMDGPU/Utils/AMDGPUPALMetadata.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,10 @@ void AMDGPUPALMetadata::setEntryPoint(unsigned CC, StringRef Name) {
261261

262262
// Set .entry_point which is defined
263263
// to be _amdgpu_<stage> and _amdgpu_cs for non-shader functions
264-
std::string EPName("_amdgpu_");
265-
EPName += std::string(getStageName(CC) + 1);
266-
getHwStage(CC)[".entry_point"] = MsgPackDoc.getNode(EPName, /*Copy=*/true);
264+
SmallString<16> EPName("_amdgpu_");
265+
raw_svector_ostream EPNameOS(EPName);
266+
EPNameOS << getStageName(CC) + 1;
267+
getHwStage(CC)[".entry_point"] = MsgPackDoc.getNode(EPNameOS.str(), /*Copy=*/true);
267268
}
268269

269270
// Set the number of used vgprs in the metadata. This is an optional

0 commit comments

Comments
 (0)