Move isReachableFromEntry out of line to avoid an unnecessary #include

llvm-svn: 35797
This commit is contained in:
Owen Anderson 2007-04-09 04:07:36 +00:00
parent a2e2e5640a
commit 6978893a8f
2 changed files with 7 additions and 4 deletions

View File

@ -27,7 +27,6 @@
#define LLVM_ANALYSIS_DOMINATORS_H
#include "llvm/Analysis/ET-Forest.h"
#include "llvm/Function.h"
#include "llvm/Pass.h"
#include <set>
@ -408,9 +407,7 @@ public:
/// isReachableFromEntry - Return true if A is dominated by the entry
/// block of the function containing it.
bool isReachableFromEntry(BasicBlock* A) {
return dominates(&A->getParent()->getEntryBlock(), A);
}
const bool isReachableFromEntry(BasicBlock* A);
/// Return the nearest common dominator of A and B.
BasicBlock *nearestCommonDominator(BasicBlock *A, BasicBlock *B) const {

View File

@ -873,6 +873,12 @@ bool ETForestBase::dominates(Instruction *A, Instruction *B) {
}
}
/// isReachableFromEntry - Return true if A is dominated by the entry
/// block of the function containing it.
const bool ETForestBase::isReachableFromEntry(BasicBlock* A) {
return dominates(&A->getParent()->getEntryBlock(), A);
}
ETNode *ETForest::getNodeForBlock(BasicBlock *BB) {
ETNode *&BBNode = Nodes[BB];
if (BBNode) return BBNode;