rocr: Fixed inefficient copy operations

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

Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Este commit está contenido en:
Alysa Liu
2025-05-27 13:22:25 -04:00
cometido por Liu, Alysa
padre 293092f32f
commit 369d89ade3
Se han modificado 5 ficheros con 7 adiciones y 7 borrados
@@ -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;
}