[llvm] r212169 - Move operator[] to DomTreeNodeBase
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Jul 1 23:50:49 PDT 2014
Author: arsenm
Date: Wed Jul 2 01:50:48 2014
New Revision: 212169
URL: http://llvm.org/viewvc/llvm-project?rev=212169&view=rev
Log:
Move operator[] to DomTreeNodeBase
The comment in base even refers to it, but it was only defined
in the subclass.
Modified:
llvm/trunk/include/llvm/IR/Dominators.h
llvm/trunk/include/llvm/Support/GenericDomTree.h
Modified: llvm/trunk/include/llvm/IR/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Dominators.h?rev=212169&r1=212168&r2=212169&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Dominators.h (original)
+++ llvm/trunk/include/llvm/IR/Dominators.h Wed Jul 2 01:50:48 2014
@@ -97,10 +97,6 @@ public:
bool dominates(const BasicBlockEdge &BBE, const Use &U) const;
bool dominates(const BasicBlockEdge &BBE, const BasicBlock *BB) const;
- inline DomTreeNode *operator[](BasicBlock *BB) const {
- return getNode(BB);
- }
-
// Ensure base class overloads are visible.
using Base::isReachableFromEntry;
Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=212169&r1=212168&r2=212169&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)
+++ llvm/trunk/include/llvm/Support/GenericDomTree.h Wed Jul 2 01:50:48 2014
@@ -330,6 +330,10 @@ public:
return DomTreeNodes.lookup(BB);
}
+ inline DomTreeNodeBase<NodeT> *operator[](NodeT *BB) const {
+ return getNode(BB);
+ }
+
/// getRootNode - This returns the entry node for the CFG of the function. If
/// this tree represents the post-dominance relations for a function, however,
/// this root may be a node with the block == NULL. This is the case when
More information about the llvm-commits
mailing list