diff options
Diffstat (limited to 'contrib/llvm/lib/Analysis/CFG.cpp')
| -rw-r--r-- | contrib/llvm/lib/Analysis/CFG.cpp | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/llvm/lib/Analysis/CFG.cpp b/contrib/llvm/lib/Analysis/CFG.cpp index e15109bd2702..0dfd57d3cb6b 100644 --- a/contrib/llvm/lib/Analysis/CFG.cpp +++ b/contrib/llvm/lib/Analysis/CFG.cpp @@ -69,8 +69,9 @@ void llvm::FindFunctionBackedges(const Function &F,  /// and return its position in the terminator instruction's list of  /// successors.  It is an error to call this with a block that is not a  /// successor. -unsigned llvm::GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ) { -  TerminatorInst *Term = BB->getTerminator(); +unsigned llvm::GetSuccessorNumber(const BasicBlock *BB, +    const BasicBlock *Succ) { +  const TerminatorInst *Term = BB->getTerminator();  #ifndef NDEBUG    unsigned e = Term->getNumSuccessors();  #endif @@ -203,7 +204,8 @@ bool llvm::isPotentiallyReachable(const Instruction *A, const Instruction *B,        return true;      // Linear scan, start at 'A', see whether we hit 'B' or the end first. -    for (BasicBlock::const_iterator I = A, E = BB->end(); I != E; ++I) { +    for (BasicBlock::const_iterator I = A->getIterator(), E = BB->end(); I != E; +         ++I) {        if (&*I == B)          return true;      }  | 
