aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/SparcV9TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-12 21:07:25 +0000
committerChris Lattner <sabre@nondot.org>2002-02-12 21:07:25 +0000
commit221d688a5ef21a22c2368c9fff0e92d7966c95e5 (patch)
treed2dc21b19341a39bdc0a47f4736d76839d9ad73b /lib/Target/SparcV9/SparcV9TargetMachine.cpp
parent3c34a46c7e51ab290b208248461542eb83c469b0 (diff)
downloadexternal_llvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.zip
external_llvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.tar.gz
external_llvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.tar.bz2
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/Target/SparcV9/SparcV9TargetMachine.cpp')
-rw-r--r--lib/Target/SparcV9/SparcV9TargetMachine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index 14be992..b026ccd 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -19,6 +19,7 @@
#include "llvm/CodeGen/RegisterAllocation.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Method.h"
+#include "llvm/BasicBlock.h"
#include "llvm/PassManager.h"
#include <iostream>
using std::cerr;
@@ -229,7 +230,11 @@ struct FreeMachineCodeForMethod : public MethodPass {
}
bool runOnMethod(Method *M) {
- for_each(M->inst_begin(), M->inst_end(), freeMachineCode);
+ for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI)
+ for (BasicBlock::iterator I = (*MI)->begin(), E = (*MI)->end();
+ I != E; ++I)
+ freeMachineCode(*I);
+
// Don't destruct MachineCodeForMethod - The global printer needs it
//MachineCodeForMethod::destruct(M);
return false;