diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 04:47:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 04:47:45 +0000 |
commit | 76c564b1bb732a92bbb4a9685fe3dc6a2d65fbdd (patch) | |
tree | 484ca3fcb8c0b98cd2217b010476de27f7bb3924 /llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp | |
parent | cc2ab0cdc97a72fd5efe0ada69d8094eabddf1be (diff) | |
download | bcm5719-llvm-76c564b1bb732a92bbb4a9685fe3dc6a2d65fbdd.tar.gz bcm5719-llvm-76c564b1bb732a92bbb4a9685fe3dc6a2d65fbdd.zip |
change a ton of code to not implicitly use the "O" raw_ostream
member of AsmPrinter. Instead, pass it in explicitly.
llvm-svn: 100306
Diffstat (limited to 'llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp index 1001d29fd8a..457dd7f9176 100644 --- a/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp +++ b/llvm/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp @@ -44,7 +44,7 @@ PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, } void PIC16AsmPrinter::EmitInstruction(const MachineInstr *MI) { - printInstruction(MI); + printInstruction(MI, O); OutStreamer.AddBlankLine(); } @@ -156,7 +156,8 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) { // printOperand - print operand of insn. -void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) { +void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum, + raw_ostream &O) { const MachineOperand &MO = MI->getOperand(opNum); const Function *F = MI->getParent()->getParent()->getFunction(); @@ -167,9 +168,7 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) { std::string RegName = getRegisterName(MO.getReg()); if ((MI->getOpcode() == PIC16::load_indirect) || (MI->getOpcode() == PIC16::store_indirect)) - { RegName.replace (0, 3, "INDF"); - } O << RegName; } return; @@ -216,7 +215,8 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) { /// printCCOperand - Print the cond code operand. /// -void PIC16AsmPrinter::printCCOperand(const MachineInstr *MI, int opNum) { +void PIC16AsmPrinter::printCCOperand(const MachineInstr *MI, int opNum, + raw_ostream &O) { int CC = (int)MI->getOperand(opNum).getImm(); O << PIC16CondCodeToString((PIC16CC::CondCodes)CC); } |