aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/Dominators.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-02 00:17:47 +0000
committerDan Gohman <gohman@apple.com>2009-07-02 00:17:47 +0000
commitf530c92cd55f35f64904e42e38b3a2bc92b347cb (patch)
tree90599072a77b48b5306f061b7006dcff85bf21d7 /include/llvm/Analysis/Dominators.h
parentc70e62110b7e165ab8f04c38ffd97f905dcda95d (diff)
Fix a bunch of other places that used operator[] to test whether
a key is present in a std::map or DenseMap to use find instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r--include/llvm/Analysis/Dominators.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 347e239d8e..366d492b11 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -618,8 +618,9 @@ protected:
}
DomTreeNodeBase<NodeT> *getNodeForBlock(NodeT *BB) {
- if (DomTreeNodeBase<NodeT> *BBNode = this->DomTreeNodes[BB])
- return BBNode;
+ typename DomTreeNodeMapType::iterator I = this->DomTreeNodes.find(BB);
+ if (I != this->DomTreeNodes.end() && I->second)
+ return I->second;
// Haven't calculated this node yet? Get or calculate the node for the
// immediate dominator.