aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/Interval.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
committerChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
commit455889aa79e3463a4b0f2161e3d9d72a683268b6 (patch)
treeaf1cb8e20b69e33a7a744365fb6e15445abf81ed /lib/Analysis/Interval.cpp
parentcc179d3ab85fd19c3fd9586409c69d14fbb6c642 (diff)
downloadexternal_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.zip
external_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.gz
external_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.bz2
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h * Make pred & succ iterators for intervals global functions * Add #includes that are now neccesary because BasicBlock.h doesn't include InstrTypes.h anymore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Interval.cpp')
-rw-r--r--lib/Analysis/Interval.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/Interval.cpp b/lib/Analysis/Interval.cpp
index 5c68be9..de5d57f 100644
--- a/lib/Analysis/Interval.cpp
+++ b/lib/Analysis/Interval.cpp
@@ -7,6 +7,7 @@
#include "llvm/Analysis/Interval.h"
#include "llvm/BasicBlock.h"
+#include "llvm/Support/CFG.h"
//===----------------------------------------------------------------------===//
// Interval Implementation
@@ -17,8 +18,8 @@
bool cfg::Interval::isLoop() const {
// There is a loop in this interval iff one of the predecessors of the header
// node lives in the interval.
- for (BasicBlock::pred_iterator I = HeaderNode->pred_begin(),
- E = HeaderNode->pred_end(); I != E; ++I) {
+ for (::pred_iterator I = ::pred_begin(HeaderNode), E = ::pred_end(HeaderNode);
+ I != E; ++I) {
if (contains(*I)) return true;
}
return false;