[Dominators] Update DominatorTree compare in case roots are different

The compare function, unusually, returns false on same, true on
different. This fixes the conditions for different roots.

Reviewed as a part of D41298.

llvm-svn: 325517
This commit is contained in:
David Green 2018-02-19 16:28:24 +00:00
parent a7c457d288
commit bc35f069f4
1 changed files with 2 additions and 2 deletions

View File

@ -319,10 +319,10 @@ protected:
if (Parent != Other.Parent) return true; if (Parent != Other.Parent) return true;
if (Roots.size() != Other.Roots.size()) if (Roots.size() != Other.Roots.size())
return false; return true;
if (!std::is_permutation(Roots.begin(), Roots.end(), Other.Roots.begin())) if (!std::is_permutation(Roots.begin(), Roots.end(), Other.Roots.begin()))
return false; return true;
const DomTreeNodeMapType &OtherDomTreeNodes = Other.DomTreeNodes; const DomTreeNodeMapType &OtherDomTreeNodes = Other.DomTreeNodes;
if (DomTreeNodes.size() != OtherDomTreeNodes.size()) if (DomTreeNodes.size() != OtherDomTreeNodes.size())