summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/AsmPrinter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-17 21:43:43 +0000
committerChris Lattner <sabre@nondot.org>2010-01-17 21:43:43 +0000
commit10b318bcb39218d2ed525e4862c854bc8d1baf63 (patch)
tree414ec32f01b35456c581d19ab8214974df2d211c /lib/Target/PIC16/AsmPrinter
parent6edec7b34a7f16e0af7fa5947b69805238d6fe6c (diff)
downloadllvm-10b318bcb39218d2ed525e4862c854bc8d1baf63.tar.gz
llvm-10b318bcb39218d2ed525e4862c854bc8d1baf63.tar.bz2
llvm-10b318bcb39218d2ed525e4862c854bc8d1baf63.tar.xz
now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use << instead, which is much simpler and cleaner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/AsmPrinter')
-rw-r--r--lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
index af2169ef52..0463596b82 100644
--- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
+++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
@@ -124,8 +124,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
O << "\tretlw high(" << PAN::getFrameLabel(CurrentFnSym->getName()) << ")\n";
// Emit function start label.
- CurrentFnSym->print(O, MAI);
- O << ":\n";
+ O << *CurrentFnSym << ":\n";
DebugLoc CurDL;
O << "\n";
@@ -191,7 +190,7 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
if (PAN::isMemIntrinsic(Sym->getName()))
LibcallDecls.push_back(createESName(Sym->getName()));
- Sym->print(O, MAI);
+ O << *Sym;
break;
}
case MachineOperand::MO_ExternalSymbol: {
@@ -212,7 +211,7 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
break;
}
case MachineOperand::MO_MachineBasicBlock:
- GetMBBSymbol(MO.getMBB()->getNumber())->print(O, MAI);
+ O << *GetMBBSymbol(MO.getMBB()->getNumber());
return;
default:
@@ -349,11 +348,8 @@ void PIC16AsmPrinter::EmitUndefinedVars(Module &M) {
if (!Items.size()) return;
O << "\n" << MAI->getCommentString() << "Imported Variables - BEGIN" << "\n";
- for (unsigned j = 0; j < Items.size(); j++) {
- O << MAI->getExternDirective();
- GetGlobalValueSymbol(Items[j])->print(O, MAI);
- O << "\n";
- }
+ for (unsigned j = 0; j < Items.size(); j++)
+ O << MAI->getExternDirective() << *GetGlobalValueSymbol(Items[j]) << "\n";
O << MAI->getCommentString() << "Imported Variables - END" << "\n";
}
@@ -363,11 +359,8 @@ void PIC16AsmPrinter::EmitDefinedVars(Module &M) {
if (!Items.size()) return;
O << "\n" << MAI->getCommentString() << "Exported Variables - BEGIN" << "\n";
- for (unsigned j = 0; j < Items.size(); j++) {
- O << MAI->getGlobalDirective();
- GetGlobalValueSymbol(Items[j])->print(O, MAI);
- O << "\n";
- }
+ for (unsigned j = 0; j < Items.size(); j++)
+ O << MAI->getGlobalDirective() << *GetGlobalValueSymbol(Items[j]) << "\n";
O << MAI->getCommentString() << "Exported Variables - END" << "\n";
}
@@ -446,7 +439,7 @@ void PIC16AsmPrinter::EmitInitializedDataSection(const PIC16Section *S) {
for (unsigned j = 0; j < Items.size(); j++) {
Constant *C = Items[j]->getInitializer();
int AddrSpace = Items[j]->getType()->getAddressSpace();
- GetGlobalValueSymbol(Items[j])->print(O, MAI);
+ O << *GetGlobalValueSymbol(Items[j]);
EmitGlobalConstant(C, AddrSpace);
}
}
@@ -465,8 +458,7 @@ EmitUninitializedDataSection(const PIC16Section *S) {
Constant *C = Items[j]->getInitializer();
const Type *Ty = C->getType();
unsigned Size = TD->getTypeAllocSize(Ty);
- GetGlobalValueSymbol(Items[j])->print(O, MAI);
- O << " RES " << Size << "\n";
+ O << *GetGlobalValueSymbol(Items[j]) << " RES " << Size << "\n";
}
}