Index: include/llvm/Analysis/PostDominators.h =================================================================== --- include/llvm/Analysis/PostDominators.h +++ include/llvm/Analysis/PostDominators.h @@ -29,7 +29,8 @@ class PostDominatorTree : public PostDomTreeBase { public: using Base = PostDomTreeBase; - + PostDominatorTree() = default; + explicit PostDominatorTree(Function &F) { recalculate(F); } /// Handle invalidation explicitly. bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &); Index: unittests/IR/DominatorTreeBatchUpdatesTest.cpp =================================================================== --- unittests/IR/DominatorTreeBatchUpdatesTest.cpp +++ unittests/IR/DominatorTreeBatchUpdatesTest.cpp @@ -22,9 +22,7 @@ const auto CFGInsert = CFGBuilder::ActionKind::Insert; const auto CFGDelete = CFGBuilder::ActionKind::Delete; -struct PostDomTree : PostDomTreeBase { - PostDomTree(Function &F) { recalculate(F); } -}; +using PostDomTree = PostDominatorTree; using DomUpdate = DominatorTree::UpdateType; static_assert( Index: unittests/IR/DominatorTreeTest.cpp =================================================================== --- unittests/IR/DominatorTreeTest.cpp +++ unittests/IR/DominatorTreeTest.cpp @@ -21,9 +21,7 @@ using namespace llvm; -struct PostDomTree : PostDomTreeBase { - PostDomTree(Function &F) { recalculate(F); } -}; +using PostDomTree = PostDominatorTree; /// Build the dominator tree for the function and run the Test. static void runWithDomTree(