Skip to content

Commit 238b3fa

Browse files
committed
Switch to StringRef
1 parent 7b33a53 commit 238b3fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,11 +2392,11 @@ bool SchedGroup::canAddMI(const MachineInstr &MI) const {
23922392
Result = false;
23932393

23942394
else if (MI.isInlineAsm()) {
2395-
std::string Text = MI.getOperand(0).getSymbolName();
2395+
StringRef Text = MI.getOperand(0).getSymbolName();
23962396
if (Text.find("SGMASK:") != std::string::npos) {
23972397
Text = Text.substr(Text.find("SGMASK:") + strlen("SGMASK:"));
23982398
Text = Text.substr(0, Text.find_first_of(" \t\r\n"));
2399-
unsigned long InlineAsmMask = std::stoul(Text, nullptr, 0);
2399+
unsigned long InlineAsmMask = std::stoul(Text.str(), nullptr, 0);
24002400
Result = ((unsigned long)SGMask & InlineAsmMask) != 0;
24012401
}
24022402
}

0 commit comments

Comments
 (0)