Move isReachableFromEntry out of line to avoid an unnecessary #include
authorOwen Anderson <resistor@mac.com>
Mon, 9 Apr 2007 04:07:36 +0000 (04:07 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 9 Apr 2007 04:07:36 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35797 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/Dominators.h
lib/VMCore/Dominators.cpp

index b6453bae173de4e82c0e985e4ba10d5a3f27a02f..03a579f5c872c2f4d285112a9f40e827dba30997 100644 (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  {
index 3206ba2e51ad8122db621933d3aa1f30d2f71fd8..45a2cebb630cca0dad8e348100279b542f611715 100644 (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;