diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2002-10-28 20:01:13 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2002-10-28 20:01:13 +0000 |
commit | 181ea4a2650f4a2174f4928fd0507fbe21137a0c (patch) | |
tree | ac6f198a1fd0f7e80a5ca2ecf348bb0b5afbab0e /llvm/lib/Target/Sparc/EmitAssembly.cpp | |
parent | 6be5e92526ba6d4e5a1d4d453c133ffffc329f70 (diff) | |
download | bcm5719-llvm-181ea4a2650f4a2174f4928fd0507fbe21137a0c.tar.gz bcm5719-llvm-181ea4a2650f4a2174f4928fd0507fbe21137a0c.zip |
Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
llvm-svn: 4352
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index 68383c01107..5f73a8d5fc6 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -294,7 +294,7 @@ struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter { void emitFunction(const Function &F); private : - void emitBasicBlock(const BasicBlock *BB); + void emitBasicBlock(const MachineBasicBlock &MBB); void emitMachineInst(const MachineInstr *MI); unsigned int printOperands(const MachineInstr *MI, unsigned int opNum); @@ -462,16 +462,13 @@ SparcFunctionAsmPrinter::emitMachineInst(const MachineInstr *MI) } void -SparcFunctionAsmPrinter::emitBasicBlock(const BasicBlock *BB) +SparcFunctionAsmPrinter::emitBasicBlock(const MachineBasicBlock &MBB) { // Emit a label for the basic block - toAsm << getID(BB) << ":\n"; - - // Get the vector of machine instructions corresponding to this bb. - const MachineBasicBlock &MIs = MachineBasicBlock::get(BB); + toAsm << getID(MBB.getBasicBlock()) << ":\n"; // Loop over all of the instructions in the basic block... - for (MachineBasicBlock::const_iterator MII = MIs.begin(), MIE = MIs.end(); + for (MachineBasicBlock::const_iterator MII = MBB.begin(), MIE = MBB.end(); MII != MIE; ++MII) emitMachineInst(*MII); toAsm << "\n"; // Seperate BB's with newlines @@ -489,8 +486,9 @@ SparcFunctionAsmPrinter::emitFunction(const Function &F) toAsm << methName << ":\n"; // Output code for all of the basic blocks in the function... - for (Function::const_iterator I = F.begin(), E = F.end(); I != E; ++I) - emitBasicBlock(I); + MachineFunction &MF = MachineFunction::get(&F); + for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); I != E; ++I) + emitBasicBlock(*I); // Output a .size directive so the debugger knows the extents of the function toAsm << ".EndOf_" << methName << ":\n\t.size " |