From: Chandler Carruth Date: Wed, 14 Jan 2015 03:58:50 +0000 (+0000) Subject: [dom] Remove extraneous inline keywords. Template functions and inline X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf0dee8bbc6be465bac8f97598bde8af9a860f3b;p=oota-llvm.git [dom] Remove extraneous inline keywords. Template functions and inline class members are implicitly "inline", no key word needed. Naturally, this could change how LLVM inlines these functions because , but that's not an excuse to use the keyword. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225939 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/GenericDomTree.h b/include/llvm/Support/GenericDomTree.h index aa182c7ab56..7640bf84003 100644 --- a/include/llvm/Support/GenericDomTree.h +++ b/include/llvm/Support/GenericDomTree.h @@ -35,7 +35,7 @@ template class DominatorBase { protected: std::vector Roots; const bool IsPostDominators; - inline explicit DominatorBase(bool isPostDom) + explicit DominatorBase(bool isPostDom) : Roots(), IsPostDominators(isPostDom) {} public: @@ -43,7 +43,7 @@ public: /// multiple blocks if we are computing post dominators. For forward /// dominators, this will always be a single block (the entry node). /// - inline const std::vector &getRoots() const { return Roots; } + const std::vector &getRoots() const { return Roots; } /// isPostDominator - Returns true if analysis based of postdoms /// @@ -140,8 +140,7 @@ private: }; template -inline raw_ostream &operator<<(raw_ostream &o, - const DomTreeNodeBase *Node) { +raw_ostream &operator<<(raw_ostream &o, const DomTreeNodeBase *Node) { if (Node->getBlock()) Node->getBlock()->printAsOperand(o, false); else @@ -153,8 +152,8 @@ inline raw_ostream &operator<<(raw_ostream &o, } template -inline void PrintDomTree(const DomTreeNodeBase *N, raw_ostream &o, - unsigned Lev) { +void PrintDomTree(const DomTreeNodeBase *N, raw_ostream &o, + unsigned Lev) { o.indent(2 * Lev) << "[" << Lev << "] " << N; for (typename DomTreeNodeBase::const_iterator I = N->begin(), E = N->end(); @@ -324,13 +323,11 @@ public: /// getNode - return the (Post)DominatorTree node for the specified basic /// block. This is the same as using operator[] on this class. /// - inline DomTreeNodeBase *getNode(NodeT *BB) const { + DomTreeNodeBase *getNode(NodeT *BB) const { return DomTreeNodes.lookup(BB); } - inline DomTreeNodeBase *operator[](NodeT *BB) const { - return getNode(BB); - } + 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, @@ -380,15 +377,13 @@ public: return isReachableFromEntry(getNode(const_cast(A))); } - inline bool isReachableFromEntry(const DomTreeNodeBase *A) const { - return A; - } + bool isReachableFromEntry(const DomTreeNodeBase *A) const { return A; } /// dominates - Returns true iff A dominates B. Note that this is not a /// constant time operation! /// - inline bool dominates(const DomTreeNodeBase *A, - const DomTreeNodeBase *B) const { + bool dominates(const DomTreeNodeBase *A, + const DomTreeNodeBase *B) const { // A node trivially dominates itself. if (B == A) return true; @@ -662,9 +657,9 @@ protected: return this->DomTreeNodes[BB] = IDomNode->addChild(C); } - inline NodeT *getIDom(NodeT *BB) const { return IDoms.lookup(BB); } + NodeT *getIDom(NodeT *BB) const { return IDoms.lookup(BB); } - inline void addRoot(NodeT *BB) { this->Roots.push_back(BB); } + void addRoot(NodeT *BB) { this->Roots.push_back(BB); } public: /// recalculate - compute a dominator tree for the given function