1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[AsmPrinter] Use ListSeparator (NFC)

This commit is contained in:
Kazu Hirata 2021-02-02 22:52:48 -08:00
parent 482abd98f7
commit 01a807c55f
2 changed files with 6 additions and 10 deletions

View File

@ -922,13 +922,9 @@ static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
const DIExpression *Expr = MI->getDebugExpression();
if (Expr->getNumElements()) {
OS << '[';
bool NeedSep = false;
ListSeparator LS;
for (auto Op : Expr->expr_ops()) {
if (NeedSep)
OS << ", ";
else
NeedSep = true;
OS << dwarf::OperationEncodingString(Op.getOp());
OS << LS << dwarf::OperationEncodingString(Op.getOp());
for (unsigned I = 0; I < Op.getNumArgs(); ++I)
OS << ' ' << Op.getArg(I);
}

View File

@ -577,10 +577,10 @@ void AsmPrinter::emitInlineAsm(const MachineInstr *MI) const {
SrcMgr.getMemoryBuffer(BufNum)->getBuffer().begin());
std::string Msg = "inline asm clobber list contains reserved registers: ";
for (auto I = RestrRegs.begin(), E = RestrRegs.end(); I != E; ++I) {
if(I != RestrRegs.begin())
Msg += ", ";
Msg += TRI->getName(*I);
ListSeparator LS;
for (const Register &RR : RestrRegs) {
Msg += LS;
Msg += TRI->getName(RR);
}
const char *Note =
"Reserved registers on the clobber list may not be "