diff options
Diffstat (limited to 'include/llvm/Analysis/PostDominators.h')
| -rw-r--r-- | include/llvm/Analysis/PostDominators.h | 21 | 
1 files changed, 14 insertions, 7 deletions
| diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 17f2e8eaf4a2..381e65539c4e 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -1,4 +1,4 @@ -//=- llvm/Analysis/PostDominators.h - Post Dominator Calculation-*- C++ -*-===// +//=- llvm/Analysis/PostDominators.h - Post Dominator Calculation --*- C++ -*-=//  //  //                     The LLVM Compiler Infrastructure  // @@ -14,16 +14,20 @@  #ifndef LLVM_ANALYSIS_POSTDOMINATORS_H  #define LLVM_ANALYSIS_POSTDOMINATORS_H +#include "llvm/ADT/DepthFirstIterator.h"  #include "llvm/IR/Dominators.h"  #include "llvm/IR/PassManager.h" +#include "llvm/Pass.h"  namespace llvm { +class Function; +class raw_ostream; +  /// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to  /// compute the post-dominator tree. -///  struct PostDominatorTree : public PostDomTreeBase<BasicBlock> { -  typedef PostDomTreeBase<BasicBlock> Base; +  using Base = PostDomTreeBase<BasicBlock>;    /// Handle invalidation explicitly.    bool invalidate(Function &F, const PreservedAnalyses &PA, @@ -34,11 +38,12 @@ struct PostDominatorTree : public PostDomTreeBase<BasicBlock> {  class PostDominatorTreeAnalysis      : public AnalysisInfoMixin<PostDominatorTreeAnalysis> {    friend AnalysisInfoMixin<PostDominatorTreeAnalysis>; +    static AnalysisKey Key;  public: -  /// \brief Provide the result typedef for this analysis pass. -  typedef PostDominatorTree Result; +  /// \brief Provide the result type for this analysis pass. +  using Result = PostDominatorTree;    /// \brief Run the analysis pass over a function and produce a post dominator    ///        tree. @@ -52,11 +57,13 @@ class PostDominatorTreePrinterPass  public:    explicit PostDominatorTreePrinterPass(raw_ostream &OS); +    PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);  };  struct PostDominatorTreeWrapperPass : public FunctionPass {    static char ID; // Pass identification, replacement for typeid +    PostDominatorTree DT;    PostDominatorTreeWrapperPass() : FunctionPass(ID) { @@ -99,6 +106,6 @@ template <> struct GraphTraits<PostDominatorTree*>    }  }; -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_ANALYSIS_POSTDOMINATORS_H | 
