Declare PostDominatorTree as a class
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 9 Feb 2018 18:41:42 +0000 (18:41 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 9 Feb 2018 18:41:42 +0000 (18:41 +0000)
Before it was declared at a struct, which differs from
DominatorTree. Make it a class so both can be declared
the same way without hitting the warning about mismatched
struct vs. class declarations.

llvm-svn: 324760

llvm/include/llvm/Analysis/PostDominators.h
llvm/include/llvm/Analysis/RegionInfo.h
llvm/include/llvm/Support/GenericDomTree.h

index 381e655..90de6be 100644 (file)
@@ -26,7 +26,8 @@ class raw_ostream;
 
 /// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to
 /// compute the post-dominator tree.
-struct PostDominatorTree : public PostDomTreeBase<BasicBlock> {
+class PostDominatorTree : public PostDomTreeBase<BasicBlock> {
+public:
   using Base = PostDomTreeBase<BasicBlock>;
 
   /// Handle invalidation explicitly.
index 7196223..4bf64d1 100644 (file)
@@ -62,7 +62,7 @@ class DominanceFrontier;
 class DominatorTree;
 class Loop;
 class LoopInfo;
-struct PostDominatorTree;
+class PostDominatorTree;
 class Region;
 template <class RegionTr> class RegionBase;
 class RegionInfo;
index 7b3a1a5..84a935f 100644 (file)
@@ -52,7 +52,7 @@ struct SemiNCAInfo;
 
 /// \brief Base class for the actual dominator tree node.
 template <class NodeT> class DomTreeNodeBase {
-  friend struct PostDominatorTree;
+  friend class PostDominatorTree;
   friend class DominatorTreeBase<NodeT, false>;
   friend class DominatorTreeBase<NodeT, true>;
   friend struct DomTreeBuilder::SemiNCAInfo<DominatorTreeBase<NodeT, false>>;