Skip to content

Commit e18a663

Browse files
committed
use smallstring
1 parent cd7df2f commit e18a663

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,13 +688,13 @@ static const StringMap<SIAtomicAddrSpace> ASNames = {{
688688
void diagnoseUnknownMMRAASName(const MachineInstr &MI, StringRef AS) {
689689
const MachineFunction *MF = MI.getMF();
690690
const Function &Fn = MF->getFunction();
691-
std::string Str;
692-
raw_string_ostream OS(Str);
691+
SmallString<128> Str;
692+
raw_svector_ostream OS(Str);
693693
OS << "unknown address space '" << AS << "'; expected one of ";
694694
ListSeparator LS;
695695
for (const auto &[Name, Val] : ASNames)
696696
OS << LS << '\'' << Name << '\'';
697-
DiagnosticInfoUnsupported BadTag(Fn, Str, MI.getDebugLoc(), DS_Warning);
697+
DiagnosticInfoUnsupported BadTag(Fn, Str.str(), MI.getDebugLoc(), DS_Warning);
698698
Fn.getContext().diagnose(BadTag);
699699
}
700700

0 commit comments

Comments
 (0)