diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-12 21:07:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-12 21:07:25 +0000 |
commit | 221d688a5ef21a22c2368c9fff0e92d7966c95e5 (patch) | |
tree | d2dc21b19341a39bdc0a47f4736d76839d9ad73b /lib/CodeGen/InstrSelection/InstrForest.cpp | |
parent | 3c34a46c7e51ab290b208248461542eb83c469b0 (diff) |
Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrForest.cpp')
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrForest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp index 29090e06cc..b11d71e1f6 100644 --- a/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -189,15 +189,18 @@ LabelNode::dumpNode(int indent) const InstrForest::InstrForest(Method *M) { - for (Method::inst_iterator I = M->inst_begin(); I != M->inst_end(); ++I) - this->buildTreeForInstruction(*I); + for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI) { + BasicBlock *BB = *MI; + for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) + buildTreeForInstruction(*I); + } } InstrForest::~InstrForest() { for (std::hash_map<const Instruction*,InstructionNode*>::iterator I = begin(); I != end(); ++I) - delete (*I).second; + delete I->second; } void |