From b84a2ba877c670af013056c514fc80a56845fb87 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 28 Oct 2002 06:01:57 +0000 Subject: [PATCH] Eliminate unneccesary use of MachineBasicBlock::get git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4339 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineFunction.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index c06c008bade..9fb7bbb68e5 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -312,13 +312,11 @@ MachineFunction::dump() const std::cerr << "\n" << Fn->getReturnType() << " \"" << Fn->getName() << "\"\n"; - for (Function::const_iterator BB = Fn->begin(); BB != Fn->end(); ++BB) - { - std::cerr << "\n" << BB->getName() << " (" << (const void*)BB - << ")" << ":" << "\n"; - MachineBasicBlock& mvec = MachineBasicBlock::get(BB); - for (unsigned i=0; i < mvec.size(); i++) - std::cerr << "\t" << *mvec[i]; - } + for (const_iterator BB = begin(); BB != end(); ++BB) { + std::cerr << "\n" << BB->getBasicBlock()->getName() << " (" + << (const void*)BB->getBasicBlock() << ")" << ":" << "\n"; + for (MachineBasicBlock::const_iterator I = BB->begin(); I != BB->end(); ++I) + std::cerr << "\t" << *I; + } std::cerr << "\nEnd function \"" << Fn->getName() << "\"\n\n"; } -- 2.34.1