rocr: Fixed inefficient copy operations

Changed variable assignments to use std::move() where appropriate

Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>


[ROCm/ROCR-Runtime commit: 369d89ade3]
This commit is contained in:
Alysa Liu
2025-05-27 13:22:25 -04:00
committed by Liu, Alysa
parent 3d3cca8083
commit 88dd451c64
5 changed files with 7 additions and 7 deletions
@@ -175,7 +175,7 @@ namespace code {
std::string Symbol::GetSymbolName() const {
std::string FullName = Name();
return FullName.rfind(":") != std::string::npos ?
FullName.substr(FullName.rfind(":") + 1) : FullName;
std::move(FullName.substr(FullName.rfind(":") + 1)) : std::move(FullName);
}
hsa_code_symbol_t Symbol::ToHandle(Symbol* sym)
@@ -1732,7 +1732,7 @@ namespace code {
std::string AmdHsaCode::MangleSymbolName(const std::string& module_name, const std::string symbol_name)
{
if (module_name.empty()) {
return symbol_name;
return std::move(symbol_name);
} else {
return module_name + "::" + symbol_name;
}