[C++11] Add 'override' keyword to virtual methods that override their base class.
authorCraig Topper <craig.topper@gmail.com>
Wed, 5 Mar 2014 07:30:04 +0000 (07:30 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 5 Mar 2014 07:30:04 +0000 (07:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202945 91177308-0d34-0410-b5e6-96231b3b80d8

45 files changed:
include/llvm/Analysis/AliasSetTracker.h
include/llvm/Analysis/BlockFrequencyInfo.h
include/llvm/Analysis/BranchProbabilityInfo.h
include/llvm/Analysis/CallGraph.h
include/llvm/Analysis/CallGraphSCCPass.h
include/llvm/Analysis/DOTGraphTraitsPass.h
include/llvm/Analysis/DependenceAnalysis.h
include/llvm/Analysis/DominanceFrontier.h
include/llvm/Analysis/FindUsedTypes.h
include/llvm/Analysis/IVUsers.h
include/llvm/Analysis/InlineCost.h
include/llvm/Analysis/IntervalPartition.h
include/llvm/Analysis/LazyValueInfo.h
include/llvm/Analysis/LibCallAliasAnalysis.h
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/LoopPass.h
include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/Analysis/PostDominators.h
include/llvm/Analysis/RegionInfo.h
include/llvm/Analysis/RegionPass.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/ScalarEvolutionExpressions.h
include/llvm/IR/PassManager.h
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/AliasAnalysisEvaluator.cpp
lib/Analysis/AliasDebugger.cpp
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/CFGPrinter.cpp
lib/Analysis/CaptureTracking.cpp
lib/Analysis/CostModel.cpp
lib/Analysis/Delinearization.cpp
lib/Analysis/IPA/CallGraphSCCPass.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/InstCount.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/Lint.cpp
lib/Analysis/LoopPass.cpp
lib/Analysis/MemDepPrinter.cpp
lib/Analysis/ModuleDebugInfoPrinter.cpp
lib/Analysis/NoAliasAnalysis.cpp
lib/Analysis/RegionPass.cpp
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
lib/Analysis/TypeBasedAliasAnalysis.cpp

index a8005058e7ea5fb4b532c1efc5c14500edd6323f..72e75eca7e01fbf76300add499473424c0af355e 100644 (file)
@@ -282,8 +282,8 @@ class AliasSetTracker {
   /// notified whenever a Value is deleted.
   class ASTCallbackVH : public CallbackVH {
     AliasSetTracker *AST;
-    virtual void deleted();
-    virtual void allUsesReplacedWith(Value *);
+    void deleted() override;
+    void allUsesReplacedWith(Value *) override;
   public:
     ASTCallbackVH(Value *V, AliasSetTracker *AST = 0);
     ASTCallbackVH &operator=(Value *V);
index e594448f478975e622d6229050ee0c56c2f2cc36..66eabb4b8525790f70bb1fb274c5876f7fa5c548 100644 (file)
@@ -37,10 +37,10 @@ public:
 
   ~BlockFrequencyInfo();
 
-  void getAnalysisUsage(AnalysisUsage &AU) const;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
 
-  bool runOnFunction(Function &F);
-  void print(raw_ostream &O, const Module *M) const;
+  bool runOnFunction(Function &F) override;
+  void print(raw_ostream &O, const Module *M) const override;
   const Function *getFunction() const;
   void view() const;
 
index 1516894a9e749f8a731fd3981cdaf554e4312c9a..4a6a280d0c8ca8b5a023bd62ad811a47a714a1c7 100644 (file)
@@ -45,9 +45,9 @@ public:
     initializeBranchProbabilityInfoPass(*PassRegistry::getPassRegistry());
   }
 
-  void getAnalysisUsage(AnalysisUsage &AU) const;
-  bool runOnFunction(Function &F);
-  void print(raw_ostream &OS, const Module *M = 0) const;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  bool runOnFunction(Function &F) override;
+  void print(raw_ostream &OS, const Module *M = 0) const override;
 
   /// \brief Get an edge's probability, relative to other out-edges of the Src.
   ///
index 2866ed6e92a7dd90f9c71269701f09d9e3330920..d46cbb60cd1cb28cbf0f3027848a9c749e639c78 100644 (file)
@@ -381,11 +381,11 @@ public:
   // Implementation of the ModulePass interface needed here.
   //
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-  virtual bool runOnModule(Module &M);
-  virtual void releaseMemory();
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  bool runOnModule(Module &M) override;
+  void releaseMemory() override;
 
-  void print(raw_ostream &o, const Module *) const;
+  void print(raw_ostream &o, const Module *) const override;
   void dump() const;
 };
 
index e609dac11891e2958167a3ce47fd3111d2d06a9b..667e1715775faa00afb4f109269161c994064299 100644 (file)
@@ -37,7 +37,8 @@ public:
 
   /// createPrinterPass - Get a pass that prints the Module
   /// corresponding to a CallGraph.
-  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;
@@ -65,18 +66,17 @@ public:
   }
 
   /// Assign pass manager to manager this pass
-  virtual void assignPassManager(PMStack &PMS,
-                                 PassManagerType PMT);
+  void assignPassManager(PMStack &PMS, PassManagerType PMT) override;
 
   ///  Return what kind of Pass Manager can manage this pass.
-  virtual PassManagerType getPotentialPassManagerType() const {
+  PassManagerType getPotentialPassManagerType() const override {
     return PMT_CallGraphPassManager;
   }
 
   /// getAnalysisUsage - For this class, we declare that we require and preserve
   /// the call graph.  If the derived class implements this method, it should
   /// always explicitly call the implementation here.
-  virtual void getAnalysisUsage(AnalysisUsage &Info) const;
+  void getAnalysisUsage(AnalysisUsage &Info) const override;
 };
 
 /// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. 
index fc3fc708df66b62fc8cebfc6ef4dbbc30239123f..ff3392a1f99a2ad0d1940900d8464264eecfcf93 100644 (file)
@@ -35,7 +35,7 @@ public:
   DOTGraphTraitsViewer(StringRef GraphName, char &ID)
       : FunctionPass(ID), Name(GraphName) {}
 
-  virtual bool runOnFunction(Function &F) {
+  bool runOnFunction(Function &F) override {
     GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis<AnalysisT>());
     std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
     std::string Title = GraphName + " for '" + F.getName().str() + "' function";
@@ -45,7 +45,7 @@ public:
     return false;
   }
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
     AU.addRequired<AnalysisT>();
   }
@@ -62,7 +62,7 @@ public:
   DOTGraphTraitsPrinter(StringRef GraphName, char &ID)
       : FunctionPass(ID), Name(GraphName) {}
 
-  virtual bool runOnFunction(Function &F) {
+  bool runOnFunction(Function &F) override {
     GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis<AnalysisT>());
     std::string Filename = Name + "." + F.getName().str() + ".dot";
     std::string ErrorInfo;
@@ -82,7 +82,7 @@ public:
     return false;
   }
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
     AU.addRequired<AnalysisT>();
   }
@@ -99,7 +99,7 @@ public:
   DOTGraphTraitsModuleViewer(StringRef GraphName, char &ID)
       : ModulePass(ID), Name(GraphName) {}
 
-  virtual bool runOnModule(Module &M) {
+  bool runOnModule(Module &M) override {
     GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis<AnalysisT>());
     std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
 
@@ -108,7 +108,7 @@ public:
     return false;
   }
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
     AU.addRequired<AnalysisT>();
   }
@@ -125,7 +125,7 @@ public:
   DOTGraphTraitsModulePrinter(StringRef GraphName, char &ID)
       : ModulePass(ID), Name(GraphName) {}
 
-  virtual bool runOnModule(Module &M) {
+  bool runOnModule(Module &M) override {
     GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis<AnalysisT>());
     std::string Filename = Name + ".dot";
     std::string ErrorInfo;
@@ -144,7 +144,7 @@ public:
     return false;
   }
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
     AU.addRequired<AnalysisT>();
   }
index ea8cecf97e6706a86774bba1f4f7b20c13334a58..a142828d4ff909855a5b20fbe034b183242b38a6 100644 (file)
@@ -227,45 +227,45 @@ namespace llvm {
 
     /// isLoopIndependent - Returns true if this is a loop-independent
     /// dependence.
-    bool isLoopIndependent() const { return LoopIndependent; }
+    bool isLoopIndependent() const override { return LoopIndependent; }
 
     /// isConfused - Returns true if this dependence is confused
     /// (the compiler understands nothing and makes worst-case
     /// assumptions).
-    bool isConfused() const { return false; }
+    bool isConfused() const override { return false; }
 
     /// isConsistent - Returns true if this dependence is consistent
     /// (occurs every time the source and destination are executed).
-    bool isConsistent() const { return Consistent; }
+    bool isConsistent() const override { return Consistent; }
 
     /// getLevels - Returns the number of common loops surrounding the
     /// source and destination of the dependence.
-    unsigned getLevels() const { return Levels; }
+    unsigned getLevels() const override { return Levels; }
 
     /// getDirection - Returns the direction associated with a particular
     /// level.
-    unsigned getDirection(unsigned Level) const;
+    unsigned getDirection(unsigned Level) const override;
 
     /// getDistance - Returns the distance (or NULL) associated with a
     /// particular level.
-    const SCEV *getDistance(unsigned Level) const;
+    const SCEV *getDistance(unsigned Level) const override;
 
     /// isPeelFirst - Returns true if peeling the first iteration from
     /// this loop will break this dependence.
-    bool isPeelFirst(unsigned Level) const;
+    bool isPeelFirst(unsigned Level) const override;
 
     /// isPeelLast - Returns true if peeling the last iteration from
     /// this loop will break this dependence.
-    bool isPeelLast(unsigned Level) const;
+    bool isPeelLast(unsigned Level) const override;
 
     /// isSplitable - Returns true if splitting the loop will break
     /// the dependence.
-    bool isSplitable(unsigned Level) const;
+    bool isSplitable(unsigned Level) const override;
 
     /// isScalar - Returns true if a particular level is scalar; that is,
     /// if no subscript in the source or destination mention the induction
     /// variable associated with the loop at this level.
-    bool isScalar(unsigned Level) const;
+    bool isScalar(unsigned Level) const override;
   private:
     unsigned short Levels;
     bool LoopIndependent;
@@ -918,10 +918,10 @@ namespace llvm {
       initializeDependenceAnalysisPass(*PassRegistry::getPassRegistry());
     }
 
-    bool runOnFunction(Function &F);
-    void releaseMemory();
-    void getAnalysisUsage(AnalysisUsage &) const;
-    void print(raw_ostream &, const Module * = 0) const;
+    bool runOnFunction(Function &F) override;
+    void releaseMemory() override;
+    void getAnalysisUsage(AnalysisUsage &) const override;
+    void print(raw_ostream &, const Module * = 0) const override;
   }; // class DependenceAnalysis
 
   /// createDependenceAnalysisPass - This creates an instance of the
index f555aeafaeb9d2746f0e12e7bcdefbc994ed24d5..4dcea2d1e76d829ad1d48fc87344fe4696584c07 100644 (file)
@@ -51,7 +51,7 @@ public:
   ///
   bool isPostDominator() const { return IsPostDominators; }
 
-  virtual void releaseMemory() { Frontiers.clear(); }
+  void releaseMemory() override { Frontiers.clear(); }
 
   // Accessor interface:
   typedef DomSetMapType::iterator iterator;
@@ -142,7 +142,7 @@ public:
 
   /// print - Convert to human readable form
   ///
-  virtual void print(raw_ostream &OS, const Module* = 0) const;
+  void print(raw_ostream &OS, const Module* = 0) const override;
 
   /// dump - Dump the dominance frontier to dbgs().
   void dump() const;
@@ -167,7 +167,7 @@ public:
     return Roots[0];
   }
 
-  virtual bool runOnFunction(Function &) {
+  bool runOnFunction(Function &) override {
     Frontiers.clear();
     DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
     Roots = DT.getRoots();
@@ -176,7 +176,7 @@ public:
     return false;
   }
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
     AU.addRequired<DominatorTreeWrapperPass>();
   }
index b22cb88135133f2cd6b1bb0d40e66f3b29a860d4..574c947f4ebb000e8769a29756facf2570b1c24e 100644 (file)
@@ -39,7 +39,7 @@ public:
   /// passed in, then the types are printed symbolically if possible, using the
   /// symbol table from the module.
   ///
-  void print(raw_ostream &o, const Module *M) const;
+  void print(raw_ostream &o, const Module *M) const override;
 
 private:
   /// IncorporateType - Incorporate one type and all of its subtypes into the
@@ -53,10 +53,10 @@ private:
 
 public:
   /// run - This incorporates all types used by the specified module
-  bool runOnModule(Module &M);
+  bool runOnModule(Module &M) override;
 
   /// getAnalysisUsage - We do not modify anything.
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
   }
 };
index 52df2fff8e974224c6c6d6f91f34a63821f2d9ac..c6bb49402b6e6155251951e3fdf89f7a40f2ea35 100644 (file)
@@ -86,7 +86,7 @@ private:
 
   /// Deleted - Implementation of CallbackVH virtual function to
   /// receive notification when the User is deleted.
-  virtual void deleted();
+  void deleted() override;
 };
 
 template<> struct ilist_traits<IVStrideUse>
@@ -129,11 +129,11 @@ class IVUsers : public LoopPass {
   /// we are interested in.
   ilist<IVStrideUse> IVUses;
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
 
-  virtual bool runOnLoop(Loop *L, LPPassManager &LPM);
+  bool runOnLoop(Loop *L, LPPassManager &LPM) override;
 
-  virtual void releaseMemory();
+  void releaseMemory() override;
 
 public:
   static char ID; // Pass ID, replacement for typeid
@@ -169,7 +169,7 @@ public:
     return Processed.count(Inst);
   }
 
-  void print(raw_ostream &OS, const Module* = 0) const;
+  void print(raw_ostream &OS, const Module* = 0) const override;
 
   /// dump - This method is used for debugging.
   void dump() const;
index a9d8d313e45ca43fbf64cd805f59b44a4ef2201c..aaed716b6a11942cb3e47bce63e3e211db187bf3 100644 (file)
@@ -108,8 +108,8 @@ public:
   ~InlineCostAnalysis();
 
   // Pass interface implementation.
-  void getAnalysisUsage(AnalysisUsage &AU) const;
-  bool runOnSCC(CallGraphSCC &SCC);
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  bool runOnSCC(CallGraphSCC &SCC) override;
 
   /// \brief Get an InlineCost object representing the cost of inlining this
   /// callsite.
index 1af7d6b0bd3402ce38d1f9545fc16c7eceb59341..05248bd0e57f38fb8935f2a615a340323fd5c7bd 100644 (file)
@@ -53,7 +53,7 @@ public:
   }
 
   // run - Calculate the interval partition for this function
-  virtual bool runOnFunction(Function &F);
+  bool runOnFunction(Function &F) override;
 
   // IntervalPartition ctor - Build a reduced interval partition from an
   // existing interval graph.  This takes an additional boolean parameter to
@@ -62,7 +62,7 @@ public:
   IntervalPartition(IntervalPartition &I, bool);
 
   // print - Show contents in human readable format...
-  virtual void print(raw_ostream &O, const Module* = 0) const;
+  void print(raw_ostream &O, const Module* = 0) const override;
 
   // getRootInterval() - Return the root interval that contains the starting
   // block of the function.
@@ -81,7 +81,7 @@ public:
   }
 
   // getAnalysisUsage - Implement the Pass API
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
   }
 
@@ -89,7 +89,7 @@ public:
   const std::vector<Interval*> &getIntervals() const { return Intervals; }
 
   // releaseMemory - Reset state back to before function was analyzed
-  void releaseMemory();
+  void releaseMemory() override;
 
 private:
   // addIntervalToPartition - Add an interval to the internal list of intervals,
index 5db048d0524b1a4cbba20f6b05bb9080eef7d173..a4cb806748b69844b38a86e3ada9149322b845ee 100644 (file)
@@ -69,10 +69,10 @@ public:
   void eraseBlock(BasicBlock *BB);
   
   // Implementation boilerplate.
-  
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-  virtual void releaseMemory();
-  virtual bool runOnFunction(Function &F);
+
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  void releaseMemory() override;
+  bool runOnFunction(Function &F) override;
 };
 
 }  // end namespace llvm
index c01b210acf4b2e949def98cbdd40aef0a29ad29f..481015e2c1a64af161f3e51b0eab0529f64b2aa6 100644 (file)
@@ -38,17 +38,17 @@ namespace llvm {
     ~LibCallAliasAnalysis();
     
     ModRefResult getModRefInfo(ImmutableCallSite CS,
-                               const Location &Loc);
-    
+                               const Location &Loc) override;
     ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                               ImmutableCallSite CS2) {
+                               ImmutableCallSite CS2) override {
       // TODO: Could compare two direct calls against each other if we cared to.
       return AliasAnalysis::getModRefInfo(CS1, CS2);
     }
-    
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    
-    virtual bool runOnFunction(Function &F) {
+
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
+
+    bool runOnFunction(Function &F) override {
       InitializeAliasAnalysis(this);                 // set up super class
       return false;
     }
@@ -57,7 +57,7 @@ namespace llvm {
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const void *PI) {
+    void *getAdjustedAnalysisPointer(const void *PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
index 52c832f7eaf7c5769a690332537786c40073e237..aeeea3cea434b33ec3e983c49c2357d82f38db51 100644 (file)
@@ -654,15 +654,15 @@ public:
 
   /// runOnFunction - Calculate the natural loop information.
   ///
-  virtual bool runOnFunction(Function &F);
+  bool runOnFunction(Function &F) override;
 
-  virtual void verifyAnalysis() const;
+  void verifyAnalysis() const override;
 
-  virtual void releaseMemory() { LI.releaseMemory(); }
+  void releaseMemory() override { LI.releaseMemory(); }
 
-  virtual void print(raw_ostream &O, const Module* M = 0) const;
+  void print(raw_ostream &O, const Module* M = 0) const override;
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
 
   /// removeLoop - This removes the specified top-level loop from this loop info
   /// object.  The loop is not deleted, as it will presumably be inserted into
index 7ec994d3697f22f9d150e662fdf69a5e7be40154..726e28636ac61aed59c6695becccac96602739cd 100644 (file)
@@ -32,7 +32,8 @@ public:
 
   /// getPrinterPass - Get a pass to print the function corresponding
   /// to a Loop.
-  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+  Pass *createPrinterPass(raw_ostream &O,
+                          const std::string &Banner) const override;
 
   // runOnLoop - This method should be implemented by the subclass to perform
   // whatever action is necessary for the specified Loop.
@@ -56,14 +57,13 @@ public:
   // LPPassManager passes. In such case, pop LPPassManager from the
   // stack. This will force assignPassManager() to create new
   // LPPassManger as expected.
-  void preparePassManager(PMStack &PMS);
+  void preparePassManager(PMStack &PMS) override;
 
   /// Assign pass manager to manage this pass
-  virtual void assignPassManager(PMStack &PMS,
-                                 PassManagerType PMT);
+  void assignPassManager(PMStack &PMS, PassManagerType PMT) override;
 
   ///  Return what kind of Pass Manager can manage this pass.
-  virtual PassManagerType getPotentialPassManagerType() const {
+  PassManagerType getPotentialPassManagerType() const override {
     return PMT_LoopPassManager;
   }
 
@@ -95,21 +95,21 @@ public:
 
   /// run - Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the module, and if so, return true.
-  bool runOnFunction(Function &F);
+  bool runOnFunction(Function &F) override;
 
   /// Pass Manager itself does not invalidate any analysis info.
   // LPPassManager needs LoopInfo.
-  void getAnalysisUsage(AnalysisUsage &Info) const;
+  void getAnalysisUsage(AnalysisUsage &Info) const override;
 
-  virtual const char *getPassName() const {
+  const char *getPassName() const override {
     return "Loop Pass Manager";
   }
 
-  virtual PMDataManager *getAsPMDataManager() { return this; }
-  virtual Pass *getAsPass() { return this; }
+  PMDataManager *getAsPMDataManager() override { return this; }
+  Pass *getAsPass() override { return this; }
 
   /// Print passes managed by this manager
-  void dumpPassStructure(unsigned Offset);
+  void dumpPassStructure(unsigned Offset) override;
 
   LoopPass *getContainedPass(unsigned N) {
     assert(N < PassVector.size() && "Pass number out of range!");
@@ -117,7 +117,7 @@ public:
     return LP;
   }
 
-  virtual PassManagerType getPassManagerType() const {
+  PassManagerType getPassManagerType() const override {
     return PMT_LoopPassManager;
   }
 
index 329aa253648739c61c730fdc4728de316d2ea22a..79945612f8e36df20d1132d0cd8640b735d4ab4e 100644 (file)
@@ -332,15 +332,15 @@ namespace llvm {
     static char ID;
 
     /// Pass Implementation stuff.  This doesn't do any analysis eagerly.
-    bool runOnFunction(Function &);
+    bool runOnFunction(Function &) override;
 
     /// Clean up memory in between runs
-    void releaseMemory();
+    void releaseMemory() override;
 
     /// getAnalysisUsage - Does not modify anything.  It uses Value Numbering
     /// and Alias Analysis.
     ///
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
 
     /// getDependency - Return the instruction on which a memory operation
     /// depends.  See the class comment for more details.  It is illegal to call
index 9ec47a30644366efe02944c7794fd8784674aedb..d330755a0871e9c866090010da55e6529c2cad15 100644 (file)
@@ -32,9 +32,9 @@ struct PostDominatorTree : public FunctionPass {
 
   ~PostDominatorTree();
 
-  virtual bool runOnFunction(Function &F);
+  bool runOnFunction(Function &F) override;
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
   }
 
@@ -85,11 +85,11 @@ struct PostDominatorTree : public FunctionPass {
     DT->getDescendants(R, Result);
   }
 
-  virtual void releaseMemory() {
+  void releaseMemory() override {
     DT->releaseMemory();
   }
 
-  virtual void print(raw_ostream &OS, const Module*) const;
+  void print(raw_ostream &OS, const Module*) const override;
 };
 
 FunctionPass* createPostDomTree();
index 5f0f4ede0fe2335cfc7f838b36264408b8b7c7bb..c45a2063415b8b012020ef6a0884d1edec7c3715 100644 (file)
@@ -648,7 +648,7 @@ class RegionInfo : public FunctionPass {
   // Calculate - detecte all regions in function and build the region tree.
   void Calculate(Function& F);
 
-  void releaseMemory();
+  void releaseMemory() override;
 
   // updateStatistics - Update statistic about created regions.
   void updateStatistics(Region *R);
@@ -665,10 +665,10 @@ public:
 
   /// @name FunctionPass interface
   //@{
-  virtual bool runOnFunction(Function &F);
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-  virtual void print(raw_ostream &OS, const Module *) const;
-  virtual void verifyAnalysis() const;
+  bool runOnFunction(Function &F) override;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  void print(raw_ostream &OS, const Module *) const override;
+  void verifyAnalysis() const override;
   //@}
 
   /// @brief Get the smallest region that contains a BasicBlock.
index e9d76d8d2ee56c9d14b27e7b66e79da53dd712e9..bd51c49e87db4c8894669e034c403ca2c352c651 100644 (file)
@@ -55,7 +55,8 @@ public:
   /// @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;
@@ -68,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;
   }
   //@}
@@ -94,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) {
@@ -117,7 +118,7 @@ public:
     return FP;
   }
 
-  virtual PassManagerType getPassManagerType() const {
+  PassManagerType getPassManagerType() const override {
     return PMT_RegionPassManager;
   }
 };
index fd2ec060a7761b11cd281b46bd9880cbfedfa1ea..06489d8d68de2b2d2315563b37344fb0e2b361f7 100644 (file)
@@ -207,8 +207,8 @@ namespace llvm {
     /// notified whenever a Value is deleted.
     class SCEVCallbackVH : public CallbackVH {
       ScalarEvolution *SE;
-      virtual void deleted();
-      virtual void allUsesReplacedWith(Value *New);
+      void deleted() override;
+      void allUsesReplacedWith(Value *New) override;
     public:
       SCEVCallbackVH(Value *V, ScalarEvolution *SE = 0);
     };
@@ -894,11 +894,11 @@ namespace llvm {
     /// indirect operand.
     bool hasOperand(const SCEV *S, const SCEV *Op) const;
 
-    virtual bool runOnFunction(Function &F);
-    virtual void releaseMemory();
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    virtual void print(raw_ostream &OS, const Module* = 0) const;
-    virtual void verifyAnalysis() const;
+    bool runOnFunction(Function &F) override;
+    void releaseMemory() override;
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
+    void print(raw_ostream &OS, const Module* = 0) const override;
+    void verifyAnalysis() const override;
 
   private:
     /// Compute the backedge taken count knowing the interval difference, the
index d9a3f7c52e1c711326d3264914359291d677667b..ed8c133f01baa1f69407e4098f89d6627ba00bb8 100644 (file)
@@ -410,8 +410,8 @@ namespace llvm {
     friend class ScalarEvolution;
 
     // Implement CallbackVH.
-    virtual void deleted();
-    virtual void allUsesReplacedWith(Value *New);
+    void deleted() override;
+    void allUsesReplacedWith(Value *New) override;
 
     /// SE - The parent ScalarEvolution value. This is used to update
     /// the parent's maps when the value associated with a SCEVUnknown
index cd3da2d8ab212ba6fc92c809cfc60f3704b97e99..4057771e2074370462d31b51467fe902e42f1f1e 100644 (file)
@@ -281,7 +281,7 @@ template <typename IRUnitT, typename PassT, typename ResultT>
 struct AnalysisResultModel<IRUnitT, PassT, ResultT,
                            false> : AnalysisResultConcept<IRUnitT> {
   AnalysisResultModel(ResultT Result) : Result(std::move(Result)) {}
-  virtual AnalysisResultModel *clone() {
+  AnalysisResultModel *clone() override {
     return new AnalysisResultModel(Result);
   }
 
@@ -290,7 +290,7 @@ struct AnalysisResultModel<IRUnitT, PassT, ResultT,
   // FIXME: We should actually use two different concepts for analysis results
   // rather than two different models, and avoid the indirect function call for
   // ones that use the trivial behavior.
-  virtual bool invalidate(IRUnitT, const PreservedAnalyses &PA) {
+  bool invalidate(IRUnitT, const PreservedAnalyses &PA) override {
     return !PA.preserved(PassT::ID());
   }
 
index 14e6f71dd26d7639b3608c106c4e8881f608129d..8f2ddb5507d4f76f9cdedc865ccc758995aea6f2 100644 (file)
@@ -370,9 +370,9 @@ namespace {
     CapturesBefore(const Instruction *I, DominatorTree *DT)
       : BeforeHere(I), DT(DT), Captured(false) {}
 
-    void tooManyUses() { Captured = true; }
+    void tooManyUses() override { Captured = true; }
 
-    bool shouldExplore(Use *U) {
+    bool shouldExplore(Use *U) override {
       Instruction *I = cast<Instruction>(U->getUser());
       BasicBlock *BB = I->getParent();
       // We explore this usage only if the usage can reach "BeforeHere".
@@ -388,7 +388,7 @@ namespace {
       return true;
     }
 
-    bool captured(Use *U) {
+    bool captured(Use *U) override {
       Instruction *I = cast<Instruction>(U->getUser());
       BasicBlock *BB = I->getParent();
       // Same logic as in shouldExplore.
index 0211be19abb70f7b9d1fbc2f7c02dfdc8487abf8..2e3bc553af3e36833ea6c69ba8425f3f5dfb3412 100644 (file)
@@ -74,13 +74,13 @@ namespace {
       }
     }
 
-    bool runOnModule(Module &M) {
+    bool runOnModule(Module &M) override {
       this->M = &M;
       InitializeAliasAnalysis(this);
       return false;
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AliasAnalysis::getAnalysisUsage(AU);
       AU.addRequired<AliasAnalysis>();
       AU.setPreservesAll();
@@ -90,25 +90,25 @@ namespace {
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(AnalysisID PI) {
+    void *getAdjustedAnalysisPointer(AnalysisID PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
     }
     
     // FIXME: We could count these too...
-    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) {
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
       return getAnalysis<AliasAnalysis>().pointsToConstantMemory(Loc, OrLocal);
     }
 
     // Forwarding functions: just delegate to a real AA implementation, counting
     // the number of responses...
-    AliasResult alias(const Location &LocA, const Location &LocB);
+    AliasResult alias(const Location &LocA, const Location &LocB) override;
 
     ModRefResult getModRefInfo(ImmutableCallSite CS,
-                               const Location &Loc);
+                               const Location &Loc) override;
     ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                               ImmutableCallSite CS2) {
+                               ImmutableCallSite CS2) override {
       return AliasAnalysis::getModRefInfo(CS1,CS2);
     }
   };
index a83fa192aab843e2d4240e1525d7f08af073eb0f..d9fa5a500f36a6a7bd253d0db42b476741d4f3b8 100644 (file)
@@ -56,12 +56,12 @@ namespace {
       initializeAAEvalPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addRequired<AliasAnalysis>();
       AU.setPreservesAll();
     }
 
-    bool doInitialization(Module &M) {
+    bool doInitialization(Module &M) override {
       NoAlias = MayAlias = PartialAlias = MustAlias = 0;
       NoModRef = Mod = Ref = ModRef = 0;
 
@@ -73,8 +73,8 @@ namespace {
       return false;
     }
 
-    bool runOnFunction(Function &F);
-    bool doFinalization(Module &M);
+    bool runOnFunction(Function &F) override;
+    bool doFinalization(Module &M) override;
   };
 }
 
index f6178e36f0a951994c4d6b86a2cdaa7529582a56..5d61cf9752e98465f0ee2860f1edfcb360ec5999 100644 (file)
@@ -43,7 +43,7 @@ namespace {
       initializeAliasDebuggerPass(*PassRegistry::getPassRegistry());
     }
 
-    bool runOnModule(Module &M) {
+    bool runOnModule(Module &M) override {
       InitializeAliasAnalysis(this);                 // set up super class
 
       for(Module::global_iterator I = M.global_begin(),
@@ -76,7 +76,7 @@ namespace {
       return false;
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AliasAnalysis::getAnalysisUsage(AU);
       AU.setPreservesAll();                         // Does not transform code
     }
@@ -85,7 +85,7 @@ namespace {
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(AnalysisID PI) {
+    void *getAdjustedAnalysisPointer(AnalysisID PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
@@ -94,7 +94,7 @@ namespace {
     //------------------------------------------------
     // Implement the AliasAnalysis API
     //
-    AliasResult alias(const Location &LocA, const Location &LocB) {
+    AliasResult alias(const Location &LocA, const Location &LocB) override {
       assert(Vals.find(LocA.Ptr) != Vals.end() &&
              "Never seen value in AA before");
       assert(Vals.find(LocB.Ptr) != Vals.end() &&
@@ -103,26 +103,26 @@ namespace {
     }
 
     ModRefResult getModRefInfo(ImmutableCallSite CS,
-                               const Location &Loc) {
+                               const Location &Loc) override {
       assert(Vals.find(Loc.Ptr) != Vals.end() && "Never seen value in AA before");
       return AliasAnalysis::getModRefInfo(CS, Loc);
     }
 
     ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                               ImmutableCallSite CS2) {
+                               ImmutableCallSite CS2) override {
       return AliasAnalysis::getModRefInfo(CS1,CS2);
     }
-    
-    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) {
+
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
       assert(Vals.find(Loc.Ptr) != Vals.end() && "Never seen value in AA before");
       return AliasAnalysis::pointsToConstantMemory(Loc, OrLocal);
     }
 
-    virtual void deleteValue(Value *V) {
+    void deleteValue(Value *V) override {
       assert(Vals.find(V) != Vals.end() && "Never seen value in AA before");
       AliasAnalysis::deleteValue(V);
     }
-    virtual void copyValue(Value *From, Value *To) {
+    void copyValue(Value *From, Value *To) override {
       Vals.insert(To);
       AliasAnalysis::copyValue(From, To);
     }
index c0030cea1df4a95c4daea297c64831e4716ae1b7..ab1005e83c32295c3a2b2a7e043f7fd63c8e75c4 100644 (file)
@@ -627,12 +627,12 @@ namespace {
       initializeAliasSetPrinterPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
       AU.addRequired<AliasAnalysis>();
     }
 
-    virtual bool runOnFunction(Function &F) {
+    bool runOnFunction(Function &F) override {
       Tracker = new AliasSetTracker(getAnalysis<AliasAnalysis>());
 
       for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
index ff27e2494b5dab7bf36c5c50d83ea84a14c4409a..4f13999098284b1dd8c7d75e89ca016a784dd38b 100644 (file)
@@ -444,17 +444,16 @@ namespace {
       initializeBasicAliasAnalysisPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual void initializePass() {
+    void initializePass() override {
       InitializeAliasAnalysis(this);
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addRequired<AliasAnalysis>();
       AU.addRequired<TargetLibraryInfo>();
     }
 
-    virtual AliasResult alias(const Location &LocA,
-                              const Location &LocB) {
+    AliasResult alias(const Location &LocA, const Location &LocB) override {
       assert(AliasCache.empty() && "AliasCache must be cleared after use!");
       assert(notDifferentParent(LocA.Ptr, LocB.Ptr) &&
              "BasicAliasAnalysis doesn't support interprocedural queries.");
@@ -469,32 +468,32 @@ namespace {
       return Alias;
     }
 
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS,
-                                       const Location &Loc);
+    ModRefResult getModRefInfo(ImmutableCallSite CS,
+                               const Location &Loc) override;
 
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                                       ImmutableCallSite CS2) {
+    ModRefResult getModRefInfo(ImmutableCallSite CS1,
+                               ImmutableCallSite CS2) override {
       // The AliasAnalysis base class has some smarts, lets use them.
       return AliasAnalysis::getModRefInfo(CS1, CS2);
     }
 
     /// pointsToConstantMemory - Chase pointers until we find a (constant
     /// global) or not.
-    virtual bool pointsToConstantMemory(const Location &Loc, bool OrLocal);
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override;
 
     /// getModRefBehavior - Return the behavior when calling the given
     /// call site.
-    virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS);
+    ModRefBehavior getModRefBehavior(ImmutableCallSite CS) override;
 
     /// getModRefBehavior - Return the behavior when calling the given function.
     /// For use when the call site is not known.
-    virtual ModRefBehavior getModRefBehavior(const Function *F);
+    ModRefBehavior getModRefBehavior(const Function *F) override;
 
     /// getAdjustedAnalysisPointer - This method is used when a pass implements
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const void *ID) {
+    void *getAdjustedAnalysisPointer(const void *ID) override {
       if (ID == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
index 3f768ce7806a113978440dfe637a29f2a7e4f9d4..537d6d10f861b85b653876f190977b702fd8a4c4 100644 (file)
@@ -28,14 +28,14 @@ namespace {
       initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F) {
+    bool runOnFunction(Function &F) override {
       F.viewCFG();
       return false;
     }
 
-    void print(raw_ostream &OS, const Module* = 0) const {}
+    void print(raw_ostream &OS, const Module* = 0) const override {}
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
   };
@@ -51,14 +51,14 @@ namespace {
       initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F) {
+    bool runOnFunction(Function &F) override {
       F.viewCFGOnly();
       return false;
     }
 
-    void print(raw_ostream &OS, const Module* = 0) const {}
+    void print(raw_ostream &OS, const Module* = 0) const override {}
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
   };
@@ -75,7 +75,7 @@ namespace {
       initializeCFGPrinterPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F) {
+    bool runOnFunction(Function &F) override {
       std::string Filename = "cfg." + F.getName().str() + ".dot";
       errs() << "Writing '" << Filename << "'...";
       
@@ -90,9 +90,9 @@ namespace {
       return false;
     }
 
-    void print(raw_ostream &OS, const Module* = 0) const {}
+    void print(raw_ostream &OS, const Module* = 0) const override {}
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
   };
@@ -108,8 +108,8 @@ namespace {
     CFGOnlyPrinter() : FunctionPass(ID) {
       initializeCFGOnlyPrinterPass(*PassRegistry::getPassRegistry());
     }
-    
-    virtual bool runOnFunction(Function &F) {
+
+    bool runOnFunction(Function &F) override {
       std::string Filename = "cfg." + F.getName().str() + ".dot";
       errs() << "Writing '" << Filename << "'...";
 
@@ -123,9 +123,9 @@ namespace {
       errs() << "\n";
       return false;
     }
-    void print(raw_ostream &OS, const Module* = 0) const {}
+    void print(raw_ostream &OS, const Module* = 0) const override {}
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
   };
index e5378d3695dafe164e293068d5d2f82a1df730c0..1e864b2954774e2f96fa579241899dade8c782b4 100644 (file)
@@ -35,9 +35,9 @@ namespace {
     explicit SimpleCaptureTracker(bool ReturnCaptures)
       : ReturnCaptures(ReturnCaptures), Captured(false) {}
 
-    void tooManyUses() { Captured = true; }
+    void tooManyUses() override { Captured = true; }
 
-    bool captured(Use *U) {
+    bool captured(Use *U) override {
       if (isa<ReturnInst>(U->getUser()) && !ReturnCaptures)
         return false;
 
index fcad3385f6d0a68260e6b8f87fb1b5d3c6e96ebd..b49211d486f1ae011f2dfb1652069b0913dfe2b1 100644 (file)
@@ -53,9 +53,9 @@ namespace {
     unsigned getInstructionCost(const Instruction *I) const;
 
   private:
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    virtual bool runOnFunction(Function &F);
-    virtual void print(raw_ostream &OS, const Module*) const;
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
+    bool runOnFunction(Function &F) override;
+    void print(raw_ostream &OS, const Module*) const override;
 
     /// The function that we analyze.
     Function *F;
index 7c2a04bab9eb52e75c9b31ccac1685e873e86c3a..fd4a2f0d7d32ab46fefae6aeb06f4fac3704a85f 100644 (file)
@@ -49,9 +49,9 @@ public:
   Delinearization() : FunctionPass(ID) {
     initializeDelinearizationPass(*PassRegistry::getPassRegistry());
   }
-  virtual bool runOnFunction(Function &F);
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-  virtual void print(raw_ostream &O, const Module *M = 0) const;
+  bool runOnFunction(Function &F) override;
+  void getAnalysisUsage(AnalysisUsage &AU) const override;
+  void print(raw_ostream &O, const Module *M = 0) const override;
 };
 
 } // end anonymous namespace
index a3f77b7eb470c7a6cd79e0ed82dd098230befce5..aafc0850613619a17ba0ba234efb82ec5d722a8a 100644 (file)
@@ -49,7 +49,7 @@ public:
 
   /// run - Execute all of the passes scheduled for execution.  Keep track of
   /// whether any of the passes modifies the module, and if so, return true.
-  bool runOnModule(Module &M);
+  bool runOnModule(Module &M) override;
 
   using ModulePass::doInitialization;
   using ModulePass::doFinalization;
@@ -58,21 +58,21 @@ public:
   bool doFinalization(CallGraph &CG);
 
   /// Pass Manager itself does not invalidate any analysis info.
-  void getAnalysisUsage(AnalysisUsage &Info) const {
+  void getAnalysisUsage(AnalysisUsage &Info) const override {
     // CGPassManager walks SCC and it needs CallGraph.
     Info.addRequired<CallGraphWrapperPass>();
     Info.setPreservesAll();
   }
 
-  virtual const char *getPassName() const {
+  const char *getPassName() const override {
     return "CallGraph Pass Manager";
   }
 
-  virtual PMDataManager *getAsPMDataManager() { return this; }
-  virtual Pass *getAsPass() { return this; }
+  PMDataManager *getAsPMDataManager() override { return this; }
+  Pass *getAsPass() override { return this; }
 
   // Print passes managed by this manager
-  void dumpPassStructure(unsigned Offset) {
+  void dumpPassStructure(unsigned Offset) override {
     errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
     for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
       Pass *P = getContainedPass(Index);
@@ -86,7 +86,7 @@ public:
     return static_cast<Pass *>(PassVector[N]);
   }
 
-  virtual PassManagerType getPassManagerType() const { 
+  PassManagerType getPassManagerType() const override {
     return PMT_CallGraphPassManager; 
   }
   
@@ -590,12 +590,12 @@ namespace {
     static char ID;
     PrintCallGraphPass(const std::string &B, raw_ostream &o)
       : CallGraphSCCPass(ID), Banner(B), Out(o) {}
-    
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
-    
-    bool runOnSCC(CallGraphSCC &SCC) {
+
+    bool runOnSCC(CallGraphSCC &SCC) override {
       Out << Banner;
       for (CallGraphSCC::iterator I = SCC.begin(), E = SCC.end(); I != E; ++I)
         (*I)->getFunction()->print(Out);
index f2133f677516e6e1a623aa835f5c3352763f8b59..dac9bd24a47154fa67d71ce0701f8ca1b095dc1d 100644 (file)
@@ -94,7 +94,7 @@ namespace {
       initializeGlobalsModRefPass(*PassRegistry::getPassRegistry());
     }
 
-    bool runOnModule(Module &M) {
+    bool runOnModule(Module &M) override {
       InitializeAliasAnalysis(this);
 
       // Find non-addr taken globals.
@@ -105,7 +105,7 @@ namespace {
       return false;
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AliasAnalysis::getAnalysisUsage(AU);
       AU.addRequired<CallGraphWrapperPass>();
       AU.setPreservesAll();                         // Does not transform code
@@ -114,18 +114,18 @@ namespace {
     //------------------------------------------------
     // Implement the AliasAnalysis API
     //
-    AliasResult alias(const Location &LocA, const Location &LocB);
+    AliasResult alias(const Location &LocA, const Location &LocB) override;
     ModRefResult getModRefInfo(ImmutableCallSite CS,
-                               const Location &Loc);
+                               const Location &Loc) override;
     ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                               ImmutableCallSite CS2) {
+                               ImmutableCallSite CS2) override {
       return AliasAnalysis::getModRefInfo(CS1, CS2);
     }
 
     /// getModRefBehavior - Return the behavior of the specified function if
     /// called from the specified call site.  The call site may be null in which
     /// case the most generic behavior of this function should be returned.
-    ModRefBehavior getModRefBehavior(const Function *F) {
+    ModRefBehavior getModRefBehavior(const Function *F) override {
       ModRefBehavior Min = UnknownModRefBehavior;
 
       if (FunctionRecord *FR = getFunctionInfo(F)) {
@@ -141,7 +141,7 @@ namespace {
     /// getModRefBehavior - Return the behavior of the specified function if
     /// called from the specified call site.  The call site may be null in which
     /// case the most generic behavior of this function should be returned.
-    ModRefBehavior getModRefBehavior(ImmutableCallSite CS) {
+    ModRefBehavior getModRefBehavior(ImmutableCallSite CS) override {
       ModRefBehavior Min = UnknownModRefBehavior;
 
       if (const Function* F = CS.getCalledFunction())
@@ -155,15 +155,15 @@ namespace {
       return ModRefBehavior(AliasAnalysis::getModRefBehavior(CS) & Min);
     }
 
-    virtual void deleteValue(Value *V);
-    virtual void copyValue(Value *From, Value *To);
-    virtual void addEscapingUse(Use &U);
+    void deleteValue(Value *V) override;
+    void copyValue(Value *From, Value *To) override;
+    void addEscapingUse(Use &U) override;
 
     /// getAdjustedAnalysisPointer - This method is used when a pass implements
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(AnalysisID PI) {
+    void *getAdjustedAnalysisPointer(AnalysisID PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
index 75a49eb90a88fa3357a5da2ba54b0d01ef73be33..876d49b1f238b94e2ed95c547377bfe8223e7c34 100644 (file)
@@ -55,12 +55,12 @@ namespace {
       initializeInstCountPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F);
+    bool runOnFunction(Function &F) override;
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
-    virtual void print(raw_ostream &O, const Module *M) const {}
+    void print(raw_ostream &O, const Module *M) const override {}
 
   };
 }
index e42d0eee31354eba7a463c59b9ef085caaf3e52e..3d6c58396afb07211318e9e64f821a7dd2b4aee0 100644 (file)
@@ -302,9 +302,9 @@ namespace {
       
     LVIValueHandle(Value *V, LazyValueInfoCache *P)
       : CallbackVH(V), Parent(P) { }
-      
-    void deleted();
-    void allUsesReplacedWith(Value *V) {
+
+    void deleted() override;
+    void allUsesReplacedWith(Value *V) override {
       deleted();
     }
   };
index 2897d7743f05c91a45c273090fe581f83f51ee92..9281148cb013d04c9d994ffabee190f84a727037 100644 (file)
@@ -113,15 +113,15 @@ namespace {
       initializeLintPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F);
+    bool runOnFunction(Function &F) override;
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
       AU.addRequired<AliasAnalysis>();
       AU.addRequired<TargetLibraryInfo>();
       AU.addRequired<DominatorTreeWrapperPass>();
     }
-    virtual void print(raw_ostream &O, const Module *M) const {}
+    void print(raw_ostream &O, const Module *M) const override {}
 
     void WriteValue(const Value *V) {
       if (!V) return;
index 90f64fb865782bc15c7d2a6e56afa53844656807..38e753f129e9393f9175d5c2c5ed0c897278c840 100644 (file)
@@ -33,11 +33,11 @@ public:
   PrintLoopPass(const std::string &B, raw_ostream &o)
       : LoopPass(ID), Banner(B), Out(o) {}
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
   }
 
-  bool runOnLoop(Loop *L, LPPassManager &) {
+  bool runOnLoop(Loop *L, LPPassManager &) override {
     Out << Banner;
     for (Loop::block_iterator b = L->block_begin(), be = L->block_end();
          b != be;
index b6c903cd6b4ffd308a6b19fbd8cd5c401b2da9bd..bc1dc69137d25a884b740508dc98171f843075bf 100644 (file)
@@ -44,17 +44,17 @@ namespace {
       initializeMemDepPrinterPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnFunction(Function &F);
+    bool runOnFunction(Function &F) override;
 
-    void print(raw_ostream &OS, const Module * = 0) const;
+    void print(raw_ostream &OS, const Module * = 0) const override;
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addRequiredTransitive<AliasAnalysis>();
       AU.addRequiredTransitive<MemoryDependenceAnalysis>();
       AU.setPreservesAll();
     }
 
-    virtual void releaseMemory() {
+    void releaseMemory() override {
       Deps.clear();
       F = 0;
     }
index 38498aa5d251e13e80956fa72a45cb12773129b6..b64847b14dd104fa257b94472de7c73af5177efc 100644 (file)
@@ -33,12 +33,12 @@ namespace {
       initializeModuleDebugInfoPrinterPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual bool runOnModule(Module &M);
+    bool runOnModule(Module &M) override;
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+    void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.setPreservesAll();
     }
-    virtual void print(raw_ostream &O, const Module *M) const;
+    void print(raw_ostream &O, const Module *M) const override;
   };
 }
 
index a039a26437f2d11365d010df4afa9b6f8c09f5ed..0c119d645963d1cf0c2ae6261deb276429a26239 100644 (file)
@@ -30,49 +30,47 @@ namespace {
       initializeNoAAPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-    }
+    void getAnalysisUsage(AnalysisUsage &AU) const override {}
 
-    virtual void initializePass() {
+    void initializePass() override {
       // Note: NoAA does not call InitializeAliasAnalysis because it's
       // special and does not support chaining.
       DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
       DL = DLP ? &DLP->getDataLayout() : 0;
     }
 
-    virtual AliasResult alias(const Location &LocA, const Location &LocB) {
+    AliasResult alias(const Location &LocA, const Location &LocB) override {
       return MayAlias;
     }
 
-    virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS) {
+    ModRefBehavior getModRefBehavior(ImmutableCallSite CS) override {
       return UnknownModRefBehavior;
     }
-    virtual ModRefBehavior getModRefBehavior(const Function *F) {
+    ModRefBehavior getModRefBehavior(const Function *F) override {
       return UnknownModRefBehavior;
     }
 
-    virtual bool pointsToConstantMemory(const Location &Loc,
-                                        bool OrLocal) {
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
       return false;
     }
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS,
-                                       const Location &Loc) {
+    ModRefResult getModRefInfo(ImmutableCallSite CS,
+                               const Location &Loc) override {
       return ModRef;
     }
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                                       ImmutableCallSite CS2) {
+    ModRefResult getModRefInfo(ImmutableCallSite CS1,
+                               ImmutableCallSite CS2) override {
       return ModRef;
     }
 
-    virtual void deleteValue(Value *V) {}
-    virtual void copyValue(Value *From, Value *To) {}
-    virtual void addEscapingUse(Use &U) {}
-    
+    void deleteValue(Value *V) override {}
+    void copyValue(Value *From, Value *To) override {}
+    void addEscapingUse(Use &U) override {}
+
     /// getAdjustedAnalysisPointer - This method is used when a pass implements
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const void *ID) {
+    void *getAdjustedAnalysisPointer(const void *ID) override {
       if (ID == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
index ac4e1149f086c51eb1a55bfa5dfa1d8c44a36821..12d7ca3ee83ba2ed3c9e4864b24d49b737281be6 100644 (file)
@@ -189,11 +189,11 @@ public:
   PrintRegionPass(const std::string &B, raw_ostream &o)
       : RegionPass(ID), Banner(B), Out(o) {}
 
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.setPreservesAll();
   }
 
-  virtual bool runOnRegion(Region *R, RGPassManager &RGM) {
+  bool runOnRegion(Region *R, RGPassManager &RGM) override {
     Out << Banner;
     for (const auto &BB : R->blocks())
       BB->print(Out);
index 79c5f0deb03b864c1fc01cfe658f6874dc49a7d1..7be6aca768909f452de7e084586aa73f14417912 100644 (file)
@@ -43,16 +43,16 @@ namespace {
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(AnalysisID PI) {
+    void *getAdjustedAnalysisPointer(AnalysisID PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
     }
 
   private:
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    virtual bool runOnFunction(Function &F);
-    virtual AliasResult alias(const Location &LocA, const Location &LocB);
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
+    bool runOnFunction(Function &F) override;
+    AliasResult alias(const Location &LocA, const Location &LocB) override;
 
     Value *GetBaseValue(const SCEV *S);
   };
index 6791d4b9102bb1ab8bc2a1e98e721aa92de57fd6..05daf18aa9a1f8ef81f5f4a5331ce251980f430c 100644 (file)
@@ -281,7 +281,7 @@ namespace {
       initializeTypeBasedAliasAnalysisPass(*PassRegistry::getPassRegistry());
     }
 
-    virtual void initializePass() {
+    void initializePass() override {
       InitializeAliasAnalysis(this);
     }
 
@@ -289,7 +289,7 @@ namespace {
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const void *PI) {
+    void *getAdjustedAnalysisPointer(const void *PI) override {
       if (PI == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
@@ -299,15 +299,15 @@ namespace {
     bool PathAliases(const MDNode *A, const MDNode *B) const;
 
   private:
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    virtual AliasResult alias(const Location &LocA, const Location &LocB);
-    virtual bool pointsToConstantMemory(const Location &Loc, bool OrLocal);
-    virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS);
-    virtual ModRefBehavior getModRefBehavior(const Function *F);
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS,
-                                       const Location &Loc);
-    virtual ModRefResult getModRefInfo(ImmutableCallSite CS1,
-                                       ImmutableCallSite CS2);
+    void getAnalysisUsage(AnalysisUsage &AU) const override;
+    AliasResult alias(const Location &LocA, const Location &LocB) override;
+    bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override;
+    ModRefBehavior getModRefBehavior(ImmutableCallSite CS) override;
+    ModRefBehavior getModRefBehavior(const Function *F) override;
+    ModRefResult getModRefInfo(ImmutableCallSite CS,
+                               const Location &Loc) override;
+    ModRefResult getModRefInfo(ImmutableCallSite CS1,
+                               ImmutableCallSite CS2) override;
   };
 }  // End of anonymous namespace