[PM/AA] Run clang-format over the SCEV-AA code to normalize the
[oota-llvm.git] / include / llvm / Analysis / RegionPass.h
index 6ed12e5db521fdc8a2ee67a85202598ff64a761b..bd51c49e87db4c8894669e034c403ca2c352c651 100644 (file)
@@ -1,4 +1,4 @@
-//===- RegionPass.h - RegionPass class ------------------------------------===//
+//===- RegionPass.h - RegionPass class --------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_REGION_PASS_H
-#define LLVM_REGION_PASS_H
+#ifndef LLVM_ANALYSIS_REGIONPASS_H
+#define LLVM_ANALYSIS_REGIONPASS_H
 
 #include "llvm/Analysis/RegionInfo.h"
-#include "llvm/Function.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/LegacyPassManagers.h"
 #include "llvm/Pass.h"
-#include "llvm/PassManagers.h"
 #include <deque>
 
 namespace llvm {
@@ -51,11 +51,15 @@ public:
 
   /// @brief Get a pass to print the LLVM IR in the region.
   ///
-  /// @param O      The ouput stream to print the Region.
+  /// @param O      The output stream to print the Region.
   /// @param Banner The banner to separate different printed passes.
   ///
   /// @return The pass to print the LLVM IR in the region.
-  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+  Pass *createPrinterPass(raw_ostream &O,
+                          const std::string &Banner) const override;
+
+  using llvm::Pass::doInitialization;
+  using llvm::Pass::doFinalization;
 
   virtual bool doInitialization(Region *R, RGPassManager &RGM) { return false; }
   virtual bool doFinalization() { return false; }
@@ -65,12 +69,12 @@ public:
   /// @name PassManager API
   ///
   //@{
-  void preparePassManager(PMStack &PMS);
+  void preparePassManager(PMStack &PMS) override;
 
-  virtual void assignPassManager(PMStack &PMS,
-    PassManagerType PMT = PMT_RegionPassManager);
+  void assignPassManager(PMStack &PMS,
+                         PassManagerType PMT = PMT_RegionPassManager) override;
 
-  virtual PassManagerType getPotentialPassManagerType() const {
+  PassManagerType getPotentialPassManagerType() const override {
     return PMT_RegionPassManager;
   }
   //@}
@@ -91,21 +95,21 @@ public:
   /// @brief Execute all of the passes scheduled for execution.
   ///
   /// @return True if any of the passes modifies the function.
-  bool runOnFunction(Function &F);
+  bool runOnFunction(Function &F) override;
 
   /// Pass Manager itself does not invalidate any analysis info.
   /// RGPassManager needs RegionInfo.
-  void getAnalysisUsage(AnalysisUsage &Info) const;
+  void getAnalysisUsage(AnalysisUsage &Info) const override;
 
-  virtual const char *getPassName() const {
+  const char *getPassName() const override {
     return "Region Pass Manager";
   }
 
-  virtual PMDataManager *getAsPMDataManager() { return this; }
-  virtual Pass *getAsPass() { return this; }
+  PMDataManager *getAsPMDataManager() override { return this; }
+  Pass *getAsPass() override { return this; }
 
   /// @brief Print passes managed by this manager.
-  void dumpPassStructure(unsigned Offset);
+  void dumpPassStructure(unsigned Offset) override;
 
   /// @brief Get passes contained by this manager.
   Pass *getContainedPass(unsigned N) {
@@ -114,7 +118,7 @@ public:
     return FP;
   }
 
-  virtual PassManagerType getPassManagerType() const {
+  PassManagerType getPassManagerType() const override {
     return PMT_RegionPassManager;
   }
 };