[llvm-commits] [llvm] r53791 - /llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sat Jul 19 06:16:32 PDT 2008
Author: asl
Date: Sat Jul 19 08:16:32 2008
New Revision: 53791
URL: http://llvm.org/viewvc/llvm-project?rev=53791&view=rev
Log:
Use chars, where possible
Modified:
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=53791&r1=53790&r2=53791&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Sat Jul 19 08:16:32 2008
@@ -138,18 +138,18 @@
int StackSize = MF.getFrameInfo()->getStackSize();
int Offset = (!MipsFI->getTopSavedRegOffset()) ? 0 :
(-(StackSize-MipsFI->getTopSavedRegOffset()));
-
+
#ifndef NDEBUG
- DOUT << "--> emitMaskDirective" << "\n";
- DOUT << "StackSize : " << StackSize << "\n";
- DOUT << "getTopSavedReg : " << MipsFI->getTopSavedRegOffset() << "\n";
+ DOUT << "--> emitMaskDirective" << '\n';
+ DOUT << "StackSize : " << StackSize << '\n';
+ DOUT << "getTopSavedReg : " << MipsFI->getTopSavedRegOffset() << '\n';
DOUT << "Offset : " << Offset << "\n\n";
#endif
unsigned int Bitmask = getSavedRegsBitmask(false, MF);
O << "\t.mask \t";
printHex32(Bitmask);
- O << "," << Offset << "\n";
+ O << ',' << Offset << '\n';
}
/// TODO: Mask Directive for Floating Point
@@ -160,7 +160,7 @@
O << "\t.fmask\t";
printHex32(Bitmask);
- O << ",0" << "\n";
+ O << ",0" << '\n';
}
// Create a bitmask with all callee saved registers for CPU
@@ -219,10 +219,10 @@
unsigned stackSize = MF.getFrameInfo()->getStackSize();
- O << "\t.frame\t" << "$" << LowercaseString(RI.get(stackReg).AsmName)
- << "," << stackSize << ","
- << "$" << LowercaseString(RI.get(returnReg).AsmName)
- << "\n";
+ O << "\t.frame\t" << '$' << LowercaseString(RI.get(stackReg).AsmName)
+ << ',' << stackSize << ','
+ << '$' << LowercaseString(RI.get(returnReg).AsmName)
+ << '\n';
}
/// Emit Set directives.
@@ -258,8 +258,8 @@
// 2 bits aligned
EmitAlignment(2, F);
- O << "\t.globl\t" << CurrentFnName << "\n";
- O << "\t.ent\t" << CurrentFnName << "\n";
+ O << "\t.globl\t" << CurrentFnName << '\n';
+ O << "\t.ent\t" << CurrentFnName << '\n';
if ((TAI->hasDotTypeDotSizeDirective()) && Subtarget->isLinux())
O << "\t.type\t" << CurrentFnName << ", @function\n";
@@ -270,7 +270,7 @@
emitMaskDirective(MF);
emitFMaskDirective(MF);
- O << "\n";
+ O << '\n';
}
/// Emit the directives used by GAS on the end of functions
@@ -283,9 +283,9 @@
O << "\t.set\tmacro\n";
O << "\t.set\treorder\n";
- O << "\t.end\t" << CurrentFnName << "\n";
+ O << "\t.end\t" << CurrentFnName << '\n';
if (TAI->hasDotTypeDotSizeDirective() && !Subtarget->isLinux())
- O << "\t.size\t" << CurrentFnName << ", .-" << CurrentFnName << "\n";
+ O << "\t.size\t" << CurrentFnName << ", .-" << CurrentFnName << '\n';
}
/// runOnMachineFunction - This uses the printMachineInstruction()
@@ -383,9 +383,9 @@
{
case MachineOperand::MO_Register:
if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()))
- O << "$" << LowercaseString (RI.get(MO.getReg()).AsmName);
+ O << '$' << LowercaseString (RI.get(MO.getReg()).AsmName);
else
- O << "$" << MO.getReg();
+ O << '$' << MO.getReg();
break;
case MachineOperand::MO_Immediate:
@@ -460,15 +460,15 @@
Mang = new Mangler(M);
// Tell the assembler which ABI we are using
- O << "\t.section .mdebug." << emitCurrentABIString() << "\n";
+ O << "\t.section .mdebug." << emitCurrentABIString() << '\n';
// TODO: handle O64 ABI
if (Subtarget->isABI_EABI())
O << "\t.section .gcc_compiled_long" <<
- (Subtarget->isGP32bit() ? "32" : "64") << "\n";
+ (Subtarget->isGP32bit() ? "32" : "64") << '\n';
// return to previous section
- O << "\t.previous" << "\n";
+ O << "\t.previous" << '\n';
return false; // success
}
@@ -536,14 +536,14 @@
case GlobalValue::WeakLinkage:
// FIXME: Verify correct for weak.
// Nonnull linkonce -> weak
- O << "\t.weak " << name << "\n";
+ O << "\t.weak " << name << '\n';
break;
case GlobalValue::AppendingLinkage:
// FIXME: appending linkage variables should go into a section of their name
// or something. For now, just emit them as external.
case GlobalValue::ExternalLinkage:
// If external or appending, declare as a global symbol
- O << TAI->getGlobalDirective() << name << "\n";
+ O << TAI->getGlobalDirective() << name << '\n';
// Fall Through
case GlobalValue::InternalLinkage:
break;
@@ -561,11 +561,11 @@
}
if (Align)
- O << "\t.align " << Align << "\n";
+ O << "\t.align " << Align << '\n';
if (TAI->hasDotTypeDotSizeDirective() && printSizeAndType) {
O << "\t.type " << name << ", at object\n";
- O << "\t.size " << name << "," << Size << "\n";
+ O << "\t.size " << name << ',' << Size << '\n';
}
O << name << ":\n";
@@ -580,7 +580,7 @@
E = M.global_end(); I != E; ++I)
printModuleLevelGV(I);
- O << "\n";
+ O << '\n';
return AsmPrinter::doFinalization(M);
}
More information about the llvm-commits
mailing list