aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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
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 'tools')
-rw-r--r--tools/analyze/analyze.cpp7
-rw-r--r--tools/dis/dis.cpp1
-rw-r--r--tools/llvm-dis/dis.cpp1
-rw-r--r--tools/llvm-dis/llvm-dis.cpp1
4 files changed, 6 insertions, 4 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp
index 112bfcc..5f3e52e 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;
diff --git a/tools/dis/dis.cpp b/tools/dis/dis.cpp
index 11e67c4..3495465 100644
--- a/tools/dis/dis.cpp
+++ b/tools/dis/dis.cpp
@@ -20,6 +20,7 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/Bytecode/Reader.h"
#include "llvm/Method.h"
+#include "llvm/Support/CFG.h"
#include "Support/DepthFirstIterator.h"
#include "Support/PostOrderIterator.h"
#include "Support/CommandLine.h"
diff --git a/tools/llvm-dis/dis.cpp b/tools/llvm-dis/dis.cpp
index 11e67c4..3495465 100644
--- a/tools/llvm-dis/dis.cpp
+++ b/tools/llvm-dis/dis.cpp
@@ -20,6 +20,7 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/Bytecode/Reader.h"
#include "llvm/Method.h"
+#include "llvm/Support/CFG.h"
#include "Support/DepthFirstIterator.h"
#include "Support/PostOrderIterator.h"
#include "Support/CommandLine.h"
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 11e67c4..3495465 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -20,6 +20,7 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/Bytecode/Reader.h"
#include "llvm/Method.h"
+#include "llvm/Support/CFG.h"
#include "Support/DepthFirstIterator.h"
#include "Support/PostOrderIterator.h"
#include "Support/CommandLine.h"