From ea470c8570cfc81f06bea007b5ca4b9344db6180 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 7 Apr 2017 17:34:37 +0000 Subject: [PATCH] [Dominators] Simplify a member function. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299789 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Dominators.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/llvm/IR/Dominators.h b/include/llvm/IR/Dominators.h index 88c8456cb46..cae03d33a7e 100644 --- a/include/llvm/IR/Dominators.h +++ b/include/llvm/IR/Dominators.h @@ -129,14 +129,8 @@ public: inline bool compare(const DominatorTree &Other) const { const DomTreeNode *R = getRootNode(); const DomTreeNode *OtherR = Other.getRootNode(); - - if (!R || !OtherR || R->getBlock() != OtherR->getBlock()) - return true; - - if (Base::compare(Other)) - return true; - - return false; + return !R || !OtherR || R->getBlock() != OtherR->getBlock() || + Base::compare(Other); } // Ensure base-class overloads are visible. -- 2.40.0