summaryrefslogtreecommitdiff
path: root/tools/analyze
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 /tools/analyze
parent3c34a46c7e51ab290b208248461542eb83c469b0 (diff)
downloadllvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.tar.gz
llvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.tar.bz2
llvm-221d688a5ef21a22c2368c9fff0e92d7966c95e5.tar.xz
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 'tools/analyze')
-rw-r--r--tools/analyze/analyze.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp
index 112bfcc04b..5f3e52ef00 100644
--- a/tools/analyze/analyze.cpp
+++ b/tools/analyze/analyze.cpp
@@ -28,6 +28,7 @@
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/FindUnsafePointerTypes.h"
#include "llvm/Analysis/FindUsedTypes.h"
+#include "llvm/Support/InstIterator.h"
#include "Support/CommandLine.h"
#include <algorithm>
#include <iostream>
@@ -119,8 +120,7 @@ struct InstForest : public MethodPass {
struct IndVars : public MethodPass {
void doit(Method *M) {
cfg::LoopInfo &LI = getAnalysis<cfg::LoopInfo>();
- for (Method::inst_iterator I = M->inst_begin(), E = M->inst_end();
- I != E; ++I)
+ for (inst_iterator I = inst_begin(M), E = inst_end(M); I != E; ++I)
if (PHINode *PN = dyn_cast<PHINode>(*I)) {
InductionVariable IV(PN, &LI);
if (IV.InductionType != InductionVariable::Unknown)
@@ -137,8 +137,7 @@ struct IndVars : public MethodPass {
struct Exprs : public MethodPass {
static void doit(Method *M) {
cout << "Classified expressions for: " << M->getName() << "\n";
- Method::inst_iterator I = M->inst_begin(), E = M->inst_end();
- for (; I != E; ++I) {
+ for (inst_iterator I = inst_begin(M), E = inst_end(M); I != E; ++I) {
cout << *I;
if ((*I)->getType() == Type::VoidTy) continue;