From f5ec1bd705460cb98a7c5218987b2b1d72d82d8a Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 2 Jul 2014 06:50:48 +0000 Subject: [PATCH] Move operator[] to DomTreeNodeBase The comment in base even refers to it, but it was only defined in the subclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212169 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Dominators.h | 4 ---- include/llvm/Support/GenericDomTree.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/IR/Dominators.h b/include/llvm/IR/Dominators.h index 364820275dd..e2d1ccc8a3c 100644 --- a/include/llvm/IR/Dominators.h +++ b/include/llvm/IR/Dominators.h @@ -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; diff --git a/include/llvm/Support/GenericDomTree.h b/include/llvm/Support/GenericDomTree.h index e344220d953..876ab6ec71a 100644 --- a/include/llvm/Support/GenericDomTree.h +++ b/include/llvm/Support/GenericDomTree.h @@ -330,6 +330,10 @@ public: return DomTreeNodes.lookup(BB); } + inline DomTreeNodeBase *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