[llvm] r324760 - Declare PostDominatorTree as a class
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 10:41:42 PST 2018
Author: arsenm
Date: Fri Feb 9 10:41:42 2018
New Revision: 324760
URL: http://llvm.org/viewvc/llvm-project?rev=324760&view=rev
Log:
Declare PostDominatorTree as a class
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.
Modified:
llvm/trunk/include/llvm/Analysis/PostDominators.h
llvm/trunk/include/llvm/Analysis/RegionInfo.h
llvm/trunk/include/llvm/Support/GenericDomTree.h
Modified: llvm/trunk/include/llvm/Analysis/PostDominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/PostDominators.h?rev=324760&r1=324759&r2=324760&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/PostDominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/PostDominators.h Fri Feb 9 10:41:42 2018
@@ -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.
Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfo.h?rev=324760&r1=324759&r2=324760&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfo.h Fri Feb 9 10:41:42 2018
@@ -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;
Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=324760&r1=324759&r2=324760&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)
+++ llvm/trunk/include/llvm/Support/GenericDomTree.h Fri Feb 9 10:41:42 2018
@@ -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>>;
More information about the llvm-commits
mailing list