Index: examples/ExceptionDemo/ExceptionDemo.cpp =================================================================== --- examples/ExceptionDemo/ExceptionDemo.cpp +++ examples/ExceptionDemo/ExceptionDemo.cpp @@ -1573,7 +1573,7 @@ std::runtime_error::operator=(toCopy))); } - virtual ~OurCppRunException (void) throw () {} + ~OurCppRunException(void) throw() override {} }; } // end anonymous namespace Index: examples/Kaleidoscope/Chapter3/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter3/toy.cpp +++ examples/Kaleidoscope/Chapter3/toy.cpp @@ -93,7 +93,7 @@ double Val; public: NumberExprAST(double val) : Val(val) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -101,7 +101,7 @@ std::string Name; public: VariableExprAST(const std::string &name) : Name(name) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -111,7 +111,7 @@ public: BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) : Op(op), LHS(lhs), RHS(rhs) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -121,7 +121,7 @@ public: CallExprAST(const std::string &callee, std::vector &args) : Callee(callee), Args(args) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, Index: examples/Kaleidoscope/Chapter4/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter4/toy.cpp +++ examples/Kaleidoscope/Chapter4/toy.cpp @@ -107,7 +107,7 @@ public: NumberExprAST(double val) : Val(val) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -116,7 +116,7 @@ public: VariableExprAST(const std::string &name) : Name(name) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -127,7 +127,7 @@ public: BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) : Op(op), LHS(lhs), RHS(rhs) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -138,7 +138,7 @@ public: CallExprAST(const std::string &callee, std::vector &args) : Callee(callee), Args(args) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, @@ -452,13 +452,13 @@ public: HelpingMemoryManager(MCJITHelper *Helper) : MasterHelper(Helper) {} - virtual ~HelpingMemoryManager() {} + ~HelpingMemoryManager() override {} /// This method returns the address of the specified symbol. /// Our implementation will attempt to find symbols in other /// modules associated with the MCJITHelper to cross link symbols /// from one generated module to another. - virtual uint64_t getSymbolAddress(const std::string &Name) override; + uint64_t getSymbolAddress(const std::string &Name) override; private: MCJITHelper *MasterHelper; Index: examples/Kaleidoscope/Chapter5/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter5/toy.cpp +++ examples/Kaleidoscope/Chapter5/toy.cpp @@ -125,7 +125,7 @@ public: NumberExprAST(double val) : Val(val) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -134,7 +134,7 @@ public: VariableExprAST(const std::string &name) : Name(name) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -145,7 +145,7 @@ public: BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) : Op(op), LHS(lhs), RHS(rhs) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -156,7 +156,7 @@ public: CallExprAST(const std::string &callee, std::vector &args) : Callee(callee), Args(args) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// IfExprAST - Expression class for if/then/else. @@ -166,7 +166,7 @@ public: IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) : Cond(cond), Then(then), Else(_else) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// ForExprAST - Expression class for for/in. @@ -178,7 +178,7 @@ ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, ExprAST *step, ExprAST *body) : VarName(varname), Start(start), End(end), Step(step), Body(body) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, Index: examples/Kaleidoscope/Chapter6/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter6/toy.cpp +++ examples/Kaleidoscope/Chapter6/toy.cpp @@ -133,7 +133,7 @@ public: NumberExprAST(double val) : Val(val) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -142,7 +142,7 @@ public: VariableExprAST(const std::string &name) : Name(name) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// UnaryExprAST - Expression class for a unary operator. @@ -153,7 +153,7 @@ public: UnaryExprAST(char opcode, ExprAST *operand) : Opcode(opcode), Operand(operand) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -164,7 +164,7 @@ public: BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) : Op(op), LHS(lhs), RHS(rhs) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -175,7 +175,7 @@ public: CallExprAST(const std::string &callee, std::vector &args) : Callee(callee), Args(args) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// IfExprAST - Expression class for if/then/else. @@ -185,7 +185,7 @@ public: IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) : Cond(cond), Then(then), Else(_else) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// ForExprAST - Expression class for for/in. @@ -197,7 +197,7 @@ ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, ExprAST *step, ExprAST *body) : VarName(varname), Start(start), End(end), Step(step), Body(body) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, Index: examples/Kaleidoscope/Chapter7/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter7/toy.cpp +++ examples/Kaleidoscope/Chapter7/toy.cpp @@ -138,7 +138,7 @@ public: NumberExprAST(double val) : Val(val) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -148,7 +148,7 @@ public: VariableExprAST(const std::string &name) : Name(name) {} const std::string &getName() const { return Name; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// UnaryExprAST - Expression class for a unary operator. @@ -159,7 +159,7 @@ public: UnaryExprAST(char opcode, ExprAST *operand) : Opcode(opcode), Operand(operand) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -170,7 +170,7 @@ public: BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) : Op(op), LHS(lhs), RHS(rhs) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -181,7 +181,7 @@ public: CallExprAST(const std::string &callee, std::vector &args) : Callee(callee), Args(args) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// IfExprAST - Expression class for if/then/else. @@ -191,7 +191,7 @@ public: IfExprAST(ExprAST *cond, ExprAST *then, ExprAST *_else) : Cond(cond), Then(then), Else(_else) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// ForExprAST - Expression class for for/in. @@ -203,7 +203,7 @@ ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, ExprAST *step, ExprAST *body) : VarName(varname), Start(start), End(end), Step(step), Body(body) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// VarExprAST - Expression class for var/in @@ -216,7 +216,7 @@ ExprAST *body) : VarNames(varnames), Body(body) {} - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, Index: examples/Kaleidoscope/Chapter8/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter8/toy.cpp +++ examples/Kaleidoscope/Chapter8/toy.cpp @@ -221,10 +221,10 @@ public: NumberExprAST(double val) : Val(val) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { return ExprAST::dump(out << Val, ind); } - virtual Value *Codegen(); + Value *Codegen() override; }; /// VariableExprAST - Expression class for referencing a variable, like "a". @@ -235,10 +235,10 @@ VariableExprAST(SourceLocation Loc, const std::string &name) : ExprAST(Loc), Name(name) {} const std::string &getName() const { return Name; } - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { return ExprAST::dump(out << Name, ind); } - virtual Value *Codegen(); + Value *Codegen() override; }; /// UnaryExprAST - Expression class for a unary operator. @@ -249,12 +249,12 @@ public: UnaryExprAST(char opcode, ExprAST *operand) : Opcode(opcode), Operand(operand) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "unary" << Opcode, ind); Operand->dump(out, ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// BinaryExprAST - Expression class for a binary operator. @@ -265,13 +265,13 @@ public: BinaryExprAST(SourceLocation Loc, char op, ExprAST *lhs, ExprAST *rhs) : ExprAST(Loc), Op(op), LHS(lhs), RHS(rhs) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "binary" << Op, ind); LHS->dump(indent(out, ind) << "LHS:", ind + 1); RHS->dump(indent(out, ind) << "RHS:", ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// CallExprAST - Expression class for function calls. @@ -283,13 +283,13 @@ CallExprAST(SourceLocation Loc, const std::string &callee, std::vector &args) : ExprAST(Loc), Callee(callee), Args(args) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "call " << Callee, ind); for (ExprAST *Arg : Args) Arg->dump(indent(out, ind + 1), ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// IfExprAST - Expression class for if/then/else. @@ -299,14 +299,14 @@ public: IfExprAST(SourceLocation Loc, ExprAST *cond, ExprAST *then, ExprAST *_else) : ExprAST(Loc), Cond(cond), Then(then), Else(_else) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "if", ind); Cond->dump(indent(out, ind) << "Cond:", ind + 1); Then->dump(indent(out, ind) << "Then:", ind + 1); Else->dump(indent(out, ind) << "Else:", ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// ForExprAST - Expression class for for/in. @@ -318,7 +318,7 @@ ForExprAST(const std::string &varname, ExprAST *start, ExprAST *end, ExprAST *step, ExprAST *body) : VarName(varname), Start(start), End(end), Step(step), Body(body) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "for", ind); Start->dump(indent(out, ind) << "Cond:", ind + 1); End->dump(indent(out, ind) << "End:", ind + 1); @@ -326,7 +326,7 @@ Body->dump(indent(out, ind) << "Body:", ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// VarExprAST - Expression class for var/in @@ -339,14 +339,14 @@ ExprAST *body) : VarNames(varnames), Body(body) {} - virtual std::ostream &dump(std::ostream &out, int ind) { + std::ostream &dump(std::ostream &out, int ind) override { ExprAST::dump(out << "var", ind); for (const auto &NamedVar : VarNames) NamedVar.second->dump(indent(out, ind) << NamedVar.first << ':', ind + 1); Body->dump(indent(out, ind) << "Body:", ind + 1); return out; } - virtual Value *Codegen(); + Value *Codegen() override; }; /// PrototypeAST - This class represents the "prototype" for a function, Index: include/llvm/Analysis/AssumptionCache.h =================================================================== --- include/llvm/Analysis/AssumptionCache.h +++ include/llvm/Analysis/AssumptionCache.h @@ -165,7 +165,7 @@ AssumptionCache &getAssumptionCache(Function &F); AssumptionCacheTracker(); - ~AssumptionCacheTracker(); + ~AssumptionCacheTracker() override; void releaseMemory() override { AssumptionCaches.shrink_and_clear(); } Index: include/llvm/Analysis/BlockFrequencyInfo.h =================================================================== --- include/llvm/Analysis/BlockFrequencyInfo.h +++ include/llvm/Analysis/BlockFrequencyInfo.h @@ -34,7 +34,7 @@ BlockFrequencyInfo(); - ~BlockFrequencyInfo(); + ~BlockFrequencyInfo() override; void getAnalysisUsage(AnalysisUsage &AU) const override; Index: include/llvm/Analysis/CallGraph.h =================================================================== --- include/llvm/Analysis/CallGraph.h +++ include/llvm/Analysis/CallGraph.h @@ -318,7 +318,7 @@ static char ID; // Class identification, replacement for typeinfo CallGraphWrapperPass(); - virtual ~CallGraphWrapperPass(); + ~CallGraphWrapperPass() override; /// \brief The internal \c CallGraph around which the rest of this interface /// is wrapped. Index: include/llvm/Analysis/DependenceAnalysis.h =================================================================== --- include/llvm/Analysis/DependenceAnalysis.h +++ include/llvm/Analysis/DependenceAnalysis.h @@ -219,7 +219,7 @@ public: FullDependence(Instruction *Src, Instruction *Dst, bool LoopIndependent, unsigned Levels); - ~FullDependence() { delete[] DV; } + ~FullDependence() override { delete[] DV; } /// isLoopIndependent - Returns true if this is a loop-independent /// dependence. Index: include/llvm/Analysis/InlineCost.h =================================================================== --- include/llvm/Analysis/InlineCost.h +++ include/llvm/Analysis/InlineCost.h @@ -107,7 +107,7 @@ static char ID; InlineCostAnalysis(); - ~InlineCostAnalysis(); + ~InlineCostAnalysis() override; // Pass interface implementation. void getAnalysisUsage(AnalysisUsage &AU) const override; Index: include/llvm/Analysis/JumpInstrTableInfo.h =================================================================== --- include/llvm/Analysis/JumpInstrTableInfo.h +++ include/llvm/Analysis/JumpInstrTableInfo.h @@ -39,7 +39,7 @@ /// The default byte alignment for jump tables is 16, which is large but /// usually safe. JumpInstrTableInfo(uint64_t ByteAlign = 16); - virtual ~JumpInstrTableInfo(); + ~JumpInstrTableInfo() override; const char *getPassName() const override { return "Jump-Instruction Table Info"; } Index: include/llvm/Analysis/LazyValueInfo.h =================================================================== --- include/llvm/Analysis/LazyValueInfo.h +++ include/llvm/Analysis/LazyValueInfo.h @@ -39,7 +39,7 @@ LazyValueInfo() : FunctionPass(ID), PImpl(nullptr) { initializeLazyValueInfoPass(*PassRegistry::getPassRegistry()); } - ~LazyValueInfo() { assert(!PImpl && "releaseMemory not called"); } + ~LazyValueInfo() override { assert(!PImpl && "releaseMemory not called"); } /// This is used to return true/false/dunno results. enum Tristate { Index: include/llvm/Analysis/LibCallAliasAnalysis.h =================================================================== --- include/llvm/Analysis/LibCallAliasAnalysis.h +++ include/llvm/Analysis/LibCallAliasAnalysis.h @@ -36,8 +36,8 @@ : FunctionPass(ID), LCI(LC) { initializeLibCallAliasAnalysisPass(*PassRegistry::getPassRegistry()); } - ~LibCallAliasAnalysis(); - + ~LibCallAliasAnalysis() override; + ModRefResult getModRefInfo(ImmutableCallSite CS, const Location &Loc) override; Index: include/llvm/Analysis/MemoryDependenceAnalysis.h =================================================================== --- include/llvm/Analysis/MemoryDependenceAnalysis.h +++ include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -329,7 +329,7 @@ public: MemoryDependenceAnalysis(); - ~MemoryDependenceAnalysis(); + ~MemoryDependenceAnalysis() override; static char ID; /// Pass Implementation stuff. This doesn't do any analysis eagerly. Index: include/llvm/Analysis/PostDominators.h =================================================================== --- include/llvm/Analysis/PostDominators.h +++ include/llvm/Analysis/PostDominators.h @@ -30,7 +30,7 @@ DT = new DominatorTreeBase(true); } - ~PostDominatorTree(); + ~PostDominatorTree() override; bool runOnFunction(Function &F) override; Index: include/llvm/Analysis/RegionInfo.h =================================================================== --- include/llvm/Analysis/RegionInfo.h +++ include/llvm/Analysis/RegionInfo.h @@ -842,7 +842,7 @@ public: explicit RegionInfo(); - virtual ~RegionInfo(); + ~RegionInfo() override; // updateStatistics - Update statistic about created regions. void updateStatistics(Region *R) final; @@ -858,7 +858,7 @@ static char ID; explicit RegionInfoPass(); - ~RegionInfoPass(); + ~RegionInfoPass() override; RegionInfo &getRegionInfo() { return RI; } Index: include/llvm/CodeGen/AsmPrinter.h =================================================================== --- include/llvm/CodeGen/AsmPrinter.h +++ include/llvm/CodeGen/AsmPrinter.h @@ -140,7 +140,7 @@ explicit AsmPrinter(TargetMachine &TM, std::unique_ptr Streamer); public: - virtual ~AsmPrinter(); + ~AsmPrinter() override; DwarfDebug *getDwarfDebug() { return DD; } DwarfDebug *getDwarfDebug() const { return DD; } Index: include/llvm/CodeGen/LiveIntervalAnalysis.h =================================================================== --- include/llvm/CodeGen/LiveIntervalAnalysis.h +++ include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -100,7 +100,7 @@ public: static char ID; // Pass identification, replacement for typeid LiveIntervals(); - virtual ~LiveIntervals(); + ~LiveIntervals() override; // Calculate the spill weight to assign to a single instruction. static float getSpillWeight(bool isDef, bool isUse, Index: include/llvm/CodeGen/LiveRangeEdit.h =================================================================== --- include/llvm/CodeGen/LiveRangeEdit.h +++ include/llvm/CodeGen/LiveRangeEdit.h @@ -122,7 +122,7 @@ MRI.setDelegate(this); } - ~LiveRangeEdit() { MRI.resetDelegate(this); } + ~LiveRangeEdit() override { MRI.resetDelegate(this); } LiveInterval &getParent() const { assert(Parent && "No parent LiveInterval"); Index: include/llvm/CodeGen/MachineBlockFrequencyInfo.h =================================================================== --- include/llvm/CodeGen/MachineBlockFrequencyInfo.h +++ include/llvm/CodeGen/MachineBlockFrequencyInfo.h @@ -35,7 +35,7 @@ MachineBlockFrequencyInfo(); - ~MachineBlockFrequencyInfo(); + ~MachineBlockFrequencyInfo() override; void getAnalysisUsage(AnalysisUsage &AU) const override; Index: include/llvm/CodeGen/MachineDominators.h =================================================================== --- include/llvm/CodeGen/MachineDominators.h +++ include/llvm/CodeGen/MachineDominators.h @@ -72,7 +72,7 @@ MachineDominatorTree(); - ~MachineDominatorTree(); + ~MachineDominatorTree() override; DominatorTreeBase &getBase() { applySplitCriticalEdges(); Index: include/llvm/CodeGen/MachineFunctionAnalysis.h =================================================================== --- include/llvm/CodeGen/MachineFunctionAnalysis.h +++ include/llvm/CodeGen/MachineFunctionAnalysis.h @@ -31,7 +31,7 @@ public: static char ID; explicit MachineFunctionAnalysis(const TargetMachine &tm); - ~MachineFunctionAnalysis(); + ~MachineFunctionAnalysis() override; MachineFunction &getMF() const { return *MF; } Index: include/llvm/CodeGen/MachineModuleInfo.h =================================================================== --- include/llvm/CodeGen/MachineModuleInfo.h +++ include/llvm/CodeGen/MachineModuleInfo.h @@ -199,7 +199,7 @@ // Real constructor. MachineModuleInfo(const MCAsmInfo &MAI, const MCRegisterInfo &MRI, const MCObjectFileInfo *MOFI); - ~MachineModuleInfo(); + ~MachineModuleInfo() override; // Initialization and Finalization bool doInitialization(Module &) override; Index: include/llvm/CodeGen/MachinePassRegistry.h =================================================================== --- include/llvm/CodeGen/MachinePassRegistry.h +++ include/llvm/CodeGen/MachinePassRegistry.h @@ -124,7 +124,7 @@ public: RegisterPassParser(cl::Option &O) : cl::parser(O) {} - ~RegisterPassParser() { RegistryClass::setListener(nullptr); } + ~RegisterPassParser() override { RegistryClass::setListener(nullptr); } void initialize() { cl::parser::initialize(); Index: include/llvm/CodeGen/MachinePostDominators.h =================================================================== --- include/llvm/CodeGen/MachinePostDominators.h +++ include/llvm/CodeGen/MachinePostDominators.h @@ -33,7 +33,7 @@ MachinePostDominatorTree(); - ~MachinePostDominatorTree(); + ~MachinePostDominatorTree() override; FunctionPass *createMachinePostDominatorTreePass(); Index: include/llvm/CodeGen/MachineRegionInfo.h =================================================================== --- include/llvm/CodeGen/MachineRegionInfo.h +++ include/llvm/CodeGen/MachineRegionInfo.h @@ -80,7 +80,7 @@ public: explicit MachineRegionInfo(); - virtual ~MachineRegionInfo(); + ~MachineRegionInfo() override; // updateStatistics - Update statistic about created regions. void updateStatistics(MachineRegion *R) final; @@ -98,7 +98,7 @@ static char ID; explicit MachineRegionInfoPass(); - ~MachineRegionInfoPass(); + ~MachineRegionInfoPass() override; MachineRegionInfo &getRegionInfo() { return RI; Index: include/llvm/CodeGen/MachineScheduler.h =================================================================== --- include/llvm/CodeGen/MachineScheduler.h +++ include/llvm/CodeGen/MachineScheduler.h @@ -385,7 +385,7 @@ ShouldTrackPressure(false), RPTracker(RegPressure), TopRPTracker(TopPressure), BotRPTracker(BotPressure) {} - virtual ~ScheduleDAGMILive(); + ~ScheduleDAGMILive() override; /// Return true if this DAG supports VReg liveness and RegPressure. bool hasVRegLiveness() const override { return true; } @@ -909,7 +909,7 @@ PostGenericScheduler(const MachineSchedContext *C): GenericSchedulerBase(C), Top(SchedBoundary::TopQID, "TopQ") {} - virtual ~PostGenericScheduler() {} + ~PostGenericScheduler() override {} void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, Index: include/llvm/CodeGen/Passes.h =================================================================== --- include/llvm/CodeGen/Passes.h +++ include/llvm/CodeGen/Passes.h @@ -125,7 +125,7 @@ // Dummy constructor. TargetPassConfig(); - virtual ~TargetPassConfig(); + ~TargetPassConfig() override; static char ID; Index: include/llvm/CodeGen/ScheduleDAGInstrs.h =================================================================== --- include/llvm/CodeGen/ScheduleDAGInstrs.h +++ include/llvm/CodeGen/ScheduleDAGInstrs.h @@ -158,7 +158,7 @@ bool RemoveKillFlags = false, LiveIntervals *LIS = nullptr); - virtual ~ScheduleDAGInstrs() {} + ~ScheduleDAGInstrs() override {} bool isPostRA() const { return IsPostRA; } Index: include/llvm/CodeGen/SelectionDAGISel.h =================================================================== --- include/llvm/CodeGen/SelectionDAGISel.h +++ include/llvm/CodeGen/SelectionDAGISel.h @@ -58,7 +58,7 @@ explicit SelectionDAGISel(TargetMachine &tm, CodeGenOpt::Level OL = CodeGenOpt::Default); - virtual ~SelectionDAGISel(); + ~SelectionDAGISel() override; const TargetLowering *getTargetLowering() const { return TLI; } Index: include/llvm/CodeGen/TargetLoweringObjectFileImpl.h =================================================================== --- include/llvm/CodeGen/TargetLoweringObjectFileImpl.h +++ include/llvm/CodeGen/TargetLoweringObjectFileImpl.h @@ -39,7 +39,7 @@ public: TargetLoweringObjectFileELF() : UseInitArray(false) {} - virtual ~TargetLoweringObjectFileELF() {} + ~TargetLoweringObjectFileELF() override {} void emitPersonalityValue(MCStreamer &Streamer, const TargetMachine &TM, const MCSymbol *Sym) const override; @@ -88,7 +88,7 @@ class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { public: - virtual ~TargetLoweringObjectFileMachO() {} + ~TargetLoweringObjectFileMachO() override {} TargetLoweringObjectFileMachO(); /// Extract the dependent library name from a linker option string. Returns @@ -136,7 +136,7 @@ class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile { public: - virtual ~TargetLoweringObjectFileCOFF() {} + ~TargetLoweringObjectFileCOFF() override {} const MCSection * getExplicitSectionGlobal(const GlobalValue *GV, Index: include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h =================================================================== --- include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h +++ include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h @@ -22,7 +22,7 @@ ConcreteSymbolEnumerator(std::unique_ptr SymbolEnumerator) : Enumerator(std::move(SymbolEnumerator)) {} - virtual ~ConcreteSymbolEnumerator() {} + ~ConcreteSymbolEnumerator() override {} uint32_t getChildCount() const override { return Enumerator->getChildCount(); Index: include/llvm/ExecutionEngine/RTDyldMemoryManager.h =================================================================== --- include/llvm/ExecutionEngine/RTDyldMemoryManager.h +++ include/llvm/ExecutionEngine/RTDyldMemoryManager.h @@ -56,7 +56,7 @@ void operator=(const RTDyldMemoryManager&) = delete; public: RTDyldMemoryManager() {} - virtual ~RTDyldMemoryManager(); + ~RTDyldMemoryManager() override; void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override; void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override; Index: include/llvm/ExecutionEngine/SectionMemoryManager.h =================================================================== --- include/llvm/ExecutionEngine/SectionMemoryManager.h +++ include/llvm/ExecutionEngine/SectionMemoryManager.h @@ -40,7 +40,7 @@ public: SectionMemoryManager() { } - virtual ~SectionMemoryManager(); + ~SectionMemoryManager() override; /// \brief Allocates a memory block of (at least) the given size suitable for /// executable code. Index: include/llvm/IR/BasicBlock.h =================================================================== --- include/llvm/IR/BasicBlock.h +++ include/llvm/IR/BasicBlock.h @@ -105,7 +105,7 @@ BasicBlock *InsertBefore = nullptr) { return new BasicBlock(Context, Name, Parent, InsertBefore); } - ~BasicBlock(); + ~BasicBlock() override; /// \brief Return the enclosing method, or null if none. const Function *getParent() const { return Parent; } Index: include/llvm/IR/Constants.h =================================================================== --- include/llvm/IR/Constants.h +++ include/llvm/IR/Constants.h @@ -547,7 +547,7 @@ protected: explicit ConstantDataSequential(Type *ty, ValueTy VT, const char *Data) : Constant(ty, VT, nullptr, 0), DataElements(Data), Next(nullptr) {} - ~ConstantDataSequential() { delete Next; } + ~ConstantDataSequential() override { delete Next; } static Constant *getImpl(StringRef Bytes, Type *Ty); Index: include/llvm/IR/Function.h =================================================================== --- include/llvm/IR/Function.h +++ include/llvm/IR/Function.h @@ -114,7 +114,7 @@ return new(0) Function(Ty, Linkage, N, M); } - ~Function(); + ~Function() override; Type *getReturnType() const; // Return the type of the ret val FunctionType *getFunctionType() const; // Return the FunctionType for me Index: include/llvm/IR/GlobalValue.h =================================================================== --- include/llvm/IR/GlobalValue.h +++ include/llvm/IR/GlobalValue.h @@ -104,7 +104,7 @@ LocalExecTLSModel }; - ~GlobalValue() { + ~GlobalValue() override { removeDeadConstantUsers(); // remove any dead constants using this. } Index: include/llvm/IR/GlobalVariable.h =================================================================== --- include/llvm/IR/GlobalVariable.h +++ include/llvm/IR/GlobalVariable.h @@ -66,7 +66,7 @@ ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0, bool isExternallyInitialized = false); - ~GlobalVariable() { + ~GlobalVariable() override { NumOperands = 1; // FIXME: needed by operator delete } Index: include/llvm/IR/InlineAsm.h =================================================================== --- include/llvm/IR/InlineAsm.h +++ include/llvm/IR/InlineAsm.h @@ -51,7 +51,7 @@ InlineAsm(PointerType *Ty, const std::string &AsmString, const std::string &Constraints, bool hasSideEffects, bool isAlignStack, AsmDialect asmDialect); - virtual ~InlineAsm(); + ~InlineAsm() override; /// When the ConstantUniqueMap merges two types and makes two InlineAsms /// identical, it destroys one of them with this method. Index: include/llvm/IR/InstrTypes.h =================================================================== --- include/llvm/IR/InstrTypes.h +++ include/llvm/IR/InstrTypes.h @@ -44,7 +44,7 @@ : Instruction(Ty, iType, Ops, NumOps, InsertAtEnd) {} // Out of line virtual method, so the vtable, etc has a home. - ~TerminatorInst(); + ~TerminatorInst() override; /// Virtual methods - Terminators should overload these and provide inline /// overrides of non-V methods. @@ -102,7 +102,7 @@ } // Out of line virtual method, so the vtable, etc has a home. - ~UnaryInstruction(); + ~UnaryInstruction() override; /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); Index: include/llvm/IR/Instruction.h =================================================================== --- include/llvm/IR/Instruction.h +++ include/llvm/IR/Instruction.h @@ -62,7 +62,7 @@ }; public: // Out of line virtual method, so the vtable, etc has a home. - ~Instruction(); + ~Instruction() override; /// user_back - Specialize the methods defined in Value, as we know that an /// instruction can only be used by other instructions. Index: include/llvm/IR/Instructions.h =================================================================== --- include/llvm/IR/Instructions.h +++ include/llvm/IR/Instructions.h @@ -91,7 +91,7 @@ const Twine &Name, BasicBlock *InsertAtEnd); // Out of line virtual method, so the vtable, etc. has a home. - virtual ~AllocaInst(); + ~AllocaInst() override; /// isArrayAllocation - Return true if there is an allocation size parameter /// to the allocation instruction that is not 1. @@ -1335,7 +1335,7 @@ static Instruction* CreateFree(Value* Source, Instruction *InsertBefore); static Instruction* CreateFree(Value* Source, BasicBlock *InsertAtEnd); - ~CallInst(); + ~CallInst() override; // Note that 'musttail' implies 'tail'. enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2 }; @@ -2175,7 +2175,7 @@ const Twine &NameStr, BasicBlock *InsertAtEnd) { return new PHINode(Ty, NumReservedValues, NameStr, InsertAtEnd); } - ~PHINode(); + ~PHINode() override; /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); @@ -2366,7 +2366,7 @@ static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd); - ~LandingPadInst(); + ~LandingPadInst() override; /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); @@ -2468,7 +2468,7 @@ static ReturnInst* Create(LLVMContext &C, BasicBlock *InsertAtEnd) { return new(0) ReturnInst(C, InsertAtEnd); } - virtual ~ReturnInst(); + ~ReturnInst() override; /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); @@ -2765,7 +2765,7 @@ return new SwitchInst(Value, Default, NumCases, InsertAtEnd); } - ~SwitchInst(); + ~SwitchInst() override; /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); @@ -2951,7 +2951,7 @@ BasicBlock *InsertAtEnd) { return new IndirectBrInst(Address, NumDests, InsertAtEnd); } - ~IndirectBrInst(); + ~IndirectBrInst() override; /// Provide fast operand accessors. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); Index: include/llvm/IR/LegacyPassManager.h =================================================================== --- include/llvm/IR/LegacyPassManager.h +++ include/llvm/IR/LegacyPassManager.h @@ -50,7 +50,7 @@ public: PassManager(); - ~PassManager(); + ~PassManager() override; void add(Pass *P) override; @@ -70,7 +70,7 @@ /// FunctionPassManager ctor - This initializes the pass manager. It needs, /// but does not take ownership of, the specified Module. explicit FunctionPassManager(Module *M); - ~FunctionPassManager(); + ~FunctionPassManager() override; void add(Pass *P) override; Index: include/llvm/IR/LegacyPassNameParser.h =================================================================== --- include/llvm/IR/LegacyPassNameParser.h +++ include/llvm/IR/LegacyPassNameParser.h @@ -43,7 +43,7 @@ public cl::parser { public: PassNameParser(cl::Option &O); - virtual ~PassNameParser(); + ~PassNameParser() override; void initialize() { cl::parser::initialize(); Index: include/llvm/IR/Metadata.h =================================================================== --- include/llvm/IR/Metadata.h +++ include/llvm/IR/Metadata.h @@ -164,7 +164,7 @@ Metadata *MD; MetadataAsValue(Type *Ty, Metadata *MD); - ~MetadataAsValue(); + ~MetadataAsValue() override; /// \brief Drop use of metadata (during teardown). void dropUse() { MD = nullptr; } Index: include/llvm/IR/Operator.h =================================================================== --- include/llvm/IR/Operator.h +++ include/llvm/IR/Operator.h @@ -42,7 +42,7 @@ // NOTE: Cannot use = delete because it's not legal to delete // an overridden method that's not deleted in the base class. Cannot leave // this unimplemented because that leads to an ODR-violation. - ~Operator(); + ~Operator() override; public: /// Return the opcode for this Instruction or ConstantExpr. Index: include/llvm/IR/User.h =================================================================== --- include/llvm/IR/User.h +++ include/llvm/IR/User.h @@ -60,9 +60,7 @@ NumOperands = 0; } public: - ~User() { - Use::zap(OperandList, OperandList + NumOperands); - } + ~User() override { Use::zap(OperandList, OperandList + NumOperands); } /// \brief Free memory allocated for User and Use objects. void operator delete(void *Usr); /// \brief Placement delete - required by std, but never called. Index: include/llvm/LineEditor/LineEditor.h =================================================================== --- include/llvm/LineEditor/LineEditor.h +++ include/llvm/LineEditor/LineEditor.h @@ -119,7 +119,7 @@ }; struct ListCompleterConcept : CompleterConcept { - ~ListCompleterConcept(); + ~ListCompleterConcept() override; CompletionAction complete(StringRef Buffer, size_t Pos) const override; static std::string getCommonPrefix(const std::vector &Comps); virtual std::vector getCompletions(StringRef Buffer, Index: include/llvm/MC/MCAsmInfoELF.h =================================================================== --- include/llvm/MC/MCAsmInfoELF.h +++ include/llvm/MC/MCAsmInfoELF.h @@ -15,8 +15,7 @@ namespace llvm { class MCAsmInfoELF : public MCAsmInfo { virtual void anchor(); - const MCSection * - getNonexecutableStackSection(MCContext &Ctx) const override final; + const MCSection *getNonexecutableStackSection(MCContext &Ctx) const final; protected: MCAsmInfoELF(); Index: include/llvm/MC/MCAssembler.h =================================================================== --- include/llvm/MC/MCAssembler.h +++ include/llvm/MC/MCAssembler.h @@ -143,7 +143,7 @@ : MCFragment(FType, SD), BundlePadding(0) { } - virtual ~MCEncodedFragment(); + ~MCEncodedFragment() override; virtual SmallVectorImpl &getContents() = 0; virtual const SmallVectorImpl &getContents() const = 0; @@ -182,7 +182,7 @@ { } - virtual ~MCEncodedFragmentWithFixups(); + ~MCEncodedFragmentWithFixups() override; typedef SmallVectorImpl::const_iterator const_fixup_iterator; typedef SmallVectorImpl::iterator fixup_iterator; Index: include/llvm/MC/MCELFStreamer.h =================================================================== --- include/llvm/MC/MCELFStreamer.h +++ include/llvm/MC/MCELFStreamer.h @@ -34,7 +34,7 @@ : MCObjectStreamer(Context, TAB, OS, Emitter), SeenIdent(false) {} - virtual ~MCELFStreamer(); + ~MCELFStreamer() override; /// state management void reset() override { Index: include/llvm/MC/MCLinkerOptimizationHint.h =================================================================== --- include/llvm/MC/MCLinkerOptimizationHint.h +++ include/llvm/MC/MCLinkerOptimizationHint.h @@ -141,7 +141,7 @@ public: raw_counting_ostream() : raw_ostream(SK_COUNTING), Count(0) {} - ~raw_counting_ostream() { flush(); } + ~raw_counting_ostream() override { flush(); } static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_COUNTING; Index: include/llvm/MC/MCObjectStreamer.h =================================================================== --- include/llvm/MC/MCObjectStreamer.h +++ include/llvm/MC/MCObjectStreamer.h @@ -51,7 +51,7 @@ protected: MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *Emitter); - ~MCObjectStreamer(); + ~MCObjectStreamer() override; public: /// state management Index: include/llvm/MC/MCParser/AsmLexer.h =================================================================== --- include/llvm/MC/MCParser/AsmLexer.h +++ include/llvm/MC/MCParser/AsmLexer.h @@ -40,7 +40,7 @@ public: AsmLexer(const MCAsmInfo &MAI); - ~AsmLexer(); + ~AsmLexer() override; void setBuffer(StringRef Buf, const char *ptr = nullptr); Index: include/llvm/MC/MCSectionCOFF.h =================================================================== --- include/llvm/MC/MCSectionCOFF.h +++ include/llvm/MC/MCSectionCOFF.h @@ -53,7 +53,7 @@ assert ((Characteristics & 0x00F00000) == 0 && "alignment must not be set upon section creation"); } - ~MCSectionCOFF(); + ~MCSectionCOFF() override; public: /// ShouldOmitSectionDirective - Decides whether a '.section' directive Index: include/llvm/MC/MCSectionELF.h =================================================================== --- include/llvm/MC/MCSectionELF.h +++ include/llvm/MC/MCSectionELF.h @@ -59,7 +59,7 @@ : MCSection(SV_ELF, K, Begin), SectionName(Section), Type(type), Flags(flags), UniqueID(UniqueID), EntrySize(entrySize), Group(group), Associated(Associated) {} - ~MCSectionELF(); + ~MCSectionELF() override; void setSectionName(StringRef Name) { SectionName = Name; } Index: include/llvm/MC/MCStreamer.h =================================================================== --- include/llvm/MC/MCStreamer.h +++ include/llvm/MC/MCStreamer.h @@ -90,7 +90,7 @@ class AArch64TargetStreamer : public MCTargetStreamer { public: AArch64TargetStreamer(MCStreamer &S); - ~AArch64TargetStreamer(); + ~AArch64TargetStreamer() override; void finish() override; @@ -115,7 +115,7 @@ class ARMTargetStreamer : public MCTargetStreamer { public: ARMTargetStreamer(MCStreamer &S); - ~ARMTargetStreamer(); + ~ARMTargetStreamer() override; virtual void emitFnStart(); virtual void emitFnEnd(); Index: include/llvm/MC/MCTargetAsmParser.h =================================================================== --- include/llvm/MC/MCTargetAsmParser.h +++ include/llvm/MC/MCTargetAsmParser.h @@ -110,7 +110,7 @@ MCTargetOptions MCOptions; public: - virtual ~MCTargetAsmParser(); + ~MCTargetAsmParser() override; uint64_t getAvailableFeatures() const { return AvailableFeatures; } void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; } Index: include/llvm/Object/IRObjectFile.h =================================================================== --- include/llvm/Object/IRObjectFile.h +++ include/llvm/Object/IRObjectFile.h @@ -31,7 +31,7 @@ public: IRObjectFile(MemoryBufferRef Object, std::unique_ptr M); - ~IRObjectFile(); + ~IRObjectFile() override; void moveSymbolNext(DataRefImpl &Symb) const override; std::error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override; Index: include/llvm/Object/SymbolicFile.h =================================================================== --- include/llvm/Object/SymbolicFile.h +++ include/llvm/Object/SymbolicFile.h @@ -118,7 +118,7 @@ class SymbolicFile : public Binary { public: - virtual ~SymbolicFile(); + ~SymbolicFile() override; SymbolicFile(unsigned int Type, MemoryBufferRef Source); // virtual interface. Index: include/llvm/Option/ArgList.h =================================================================== --- include/llvm/Option/ArgList.h +++ include/llvm/Option/ArgList.h @@ -320,7 +320,7 @@ public: InputArgList(const char* const *ArgBegin, const char* const *ArgEnd); - ~InputArgList(); + ~InputArgList() override; const char *getArgString(unsigned Index) const override { return ArgStrings[Index]; @@ -355,7 +355,7 @@ public: /// Construct a new derived arg list from \p BaseArgs. DerivedArgList(const InputArgList &BaseArgs); - ~DerivedArgList(); + ~DerivedArgList() override; const char *getArgString(unsigned Index) const override { return BaseArgs.getArgString(Index); Index: include/llvm/Pass.h =================================================================== --- include/llvm/Pass.h +++ include/llvm/Pass.h @@ -250,7 +250,7 @@ explicit ModulePass(char &pid) : Pass(PT_Module, pid) {} // Force out-of-line virtual method. - virtual ~ModulePass(); + ~ModulePass() override; }; @@ -279,7 +279,7 @@ : ModulePass(pid) {} // Force out-of-line virtual method. - virtual ~ImmutablePass(); + ~ImmutablePass() override; }; //===----------------------------------------------------------------------===// Index: include/llvm/Support/FormattedStream.h =================================================================== --- include/llvm/Support/FormattedStream.h +++ include/llvm/Support/FormattedStream.h @@ -99,7 +99,7 @@ return OS->getKind() == SK_FORMATTED; } - ~formatted_raw_ostream() { + ~formatted_raw_ostream() override { flush(); releaseStream(); } Index: include/llvm/Support/YAMLTraits.h =================================================================== --- include/llvm/Support/YAMLTraits.h +++ include/llvm/Support/YAMLTraits.h @@ -888,7 +888,7 @@ void *Ctxt = nullptr, SourceMgr::DiagHandlerTy DiagHandler = nullptr, void *DiagHandlerCtxt = nullptr); - ~Input(); + ~Input() override; // Check if there was an syntax or semantic error during parsing. std::error_code error(); @@ -955,7 +955,7 @@ }; class MapHNode : public HNode { - virtual void anchor(); + void anchor() override; public: MapHNode(Node *n) : HNode(n) { } @@ -974,7 +974,7 @@ }; class SequenceHNode : public HNode { - virtual void anchor(); + void anchor() override; public: SequenceHNode(Node *n) : HNode(n) { } @@ -1020,7 +1020,7 @@ class Output : public IO { public: Output(llvm::raw_ostream &, void *Ctxt=nullptr); - virtual ~Output(); + ~Output() override; bool outputting() override; bool mapTag(StringRef, bool) override; Index: include/llvm/Support/circular_raw_ostream.h =================================================================== --- include/llvm/Support/circular_raw_ostream.h +++ include/llvm/Support/circular_raw_ostream.h @@ -117,7 +117,7 @@ setStream(Stream, Owns); } - ~circular_raw_ostream() { + ~circular_raw_ostream() override { flush(); flushBufferWithBanner(); releaseStream(); Index: include/llvm/Support/raw_os_ostream.h =================================================================== --- include/llvm/Support/raw_os_ostream.h +++ include/llvm/Support/raw_os_ostream.h @@ -34,7 +34,7 @@ public: raw_os_ostream(std::ostream &O) : raw_ostream(SK_STD_OS), OS(O) {} - ~raw_os_ostream(); + ~raw_os_ostream() override; static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_STD_OS; } Index: include/llvm/Support/raw_ostream.h =================================================================== --- include/llvm/Support/raw_ostream.h +++ include/llvm/Support/raw_ostream.h @@ -381,7 +381,7 @@ static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_FD; } - ~raw_fd_ostream(); + ~raw_fd_ostream() override; /// Manually flush the stream and close the file. Note that this does not call /// fsync. @@ -461,7 +461,7 @@ uint64_t current_pos() const override { return OS.size(); } public: explicit raw_string_ostream(std::string &O) : raw_ostream(SK_STRING), OS(O) {} - ~raw_string_ostream(); + ~raw_string_ostream() override; static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_STRING; @@ -492,7 +492,7 @@ /// \param O The vector to write to; this should generally have at least 128 /// bytes free to avoid any extraneous memory overhead. explicit raw_svector_ostream(SmallVectorImpl &O); - ~raw_svector_ostream(); + ~raw_svector_ostream() override; static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_SVECTOR; @@ -519,7 +519,7 @@ public: explicit raw_null_ostream() : raw_ostream(SK_NULL) {} - ~raw_null_ostream(); + ~raw_null_ostream() override; static bool classof(const raw_ostream *OS) { return OS->getKind() == SK_NULL; } Index: lib/Analysis/AliasAnalysisCounter.cpp =================================================================== --- lib/Analysis/AliasAnalysisCounter.cpp +++ lib/Analysis/AliasAnalysisCounter.cpp @@ -44,7 +44,7 @@ errs() << " " << Val << " " << Desc << " responses (" << Val*100/Sum << "%)\n"; } - ~AliasAnalysisCounter() { + ~AliasAnalysisCounter() override { unsigned AASum = No+May+Partial+Must; unsigned MRSum = NoMR+JustRef+JustMod+MR; if (AASum + MRSum) { // Print a report if any counted queries occurred... Index: lib/Analysis/CFLAliasAnalysis.cpp =================================================================== --- lib/Analysis/CFLAliasAnalysis.cpp +++ lib/Analysis/CFLAliasAnalysis.cpp @@ -161,7 +161,7 @@ assert(CFLAA != nullptr); } - virtual ~FunctionHandle() {} + ~FunctionHandle() override {} void deleted() override { removeSelfFromCache(); } void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } @@ -189,7 +189,7 @@ initializeCFLAliasAnalysisPass(*PassRegistry::getPassRegistry()); } - virtual ~CFLAliasAnalysis() {} + ~CFLAliasAnalysis() override {} void getAnalysisUsage(AnalysisUsage &AU) const override { AliasAnalysis::getAnalysisUsage(AU); Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -230,7 +230,7 @@ DiagnosticHandlerFunction DiagnosticHandler); explicit BitcodeReader(DataStreamer *streamer, LLVMContext &C, DiagnosticHandlerFunction DiagnosticHandler); - ~BitcodeReader() { FreeState(); } + ~BitcodeReader() override { FreeState(); } std::error_code materializeForwardReferencedFunctions(); Index: lib/CodeGen/AggressiveAntiDepBreaker.h =================================================================== --- lib/CodeGen/AggressiveAntiDepBreaker.h +++ lib/CodeGen/AggressiveAntiDepBreaker.h @@ -127,7 +127,7 @@ AggressiveAntiDepBreaker(MachineFunction& MFi, const RegisterClassInfo &RCI, TargetSubtargetInfo::RegClassVector& CriticalPathRCs); - ~AggressiveAntiDepBreaker(); + ~AggressiveAntiDepBreaker() override; /// Initialize anti-dep breaking for a new basic block. void StartBlock(MachineBasicBlock *BB) override; Index: lib/CodeGen/AsmPrinter/DwarfException.h =================================================================== --- lib/CodeGen/AsmPrinter/DwarfException.h +++ lib/CodeGen/AsmPrinter/DwarfException.h @@ -48,7 +48,7 @@ // Main entry points. // DwarfCFIException(AsmPrinter *A); - virtual ~DwarfCFIException(); + ~DwarfCFIException() override; /// Emit all exception information that should come after the content. void endModule() override; @@ -70,7 +70,7 @@ // Main entry points. // ARMException(AsmPrinter *A); - virtual ~ARMException(); + ~ARMException() override; /// Emit all exception information that should come after the content. void endModule() override; Index: lib/CodeGen/AsmPrinter/EHStreamer.h =================================================================== --- lib/CodeGen/AsmPrinter/EHStreamer.h +++ lib/CodeGen/AsmPrinter/EHStreamer.h @@ -125,7 +125,7 @@ public: EHStreamer(AsmPrinter *A); - virtual ~EHStreamer(); + ~EHStreamer() override; // Unused. void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {} Index: lib/CodeGen/AsmPrinter/Win64Exception.h =================================================================== --- lib/CodeGen/AsmPrinter/Win64Exception.h +++ lib/CodeGen/AsmPrinter/Win64Exception.h @@ -43,7 +43,7 @@ // Main entry points. // Win64Exception(AsmPrinter *A); - virtual ~Win64Exception(); + ~Win64Exception() override; /// Emit all exception information that should come after the content. void endModule() override; Index: lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h =================================================================== --- lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h +++ lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h @@ -114,7 +114,7 @@ public: WinCodeViewLineTables(AsmPrinter *Asm); - ~WinCodeViewLineTables() { + ~WinCodeViewLineTables() override { for (DirAndFilenameToFilepathMapTy::iterator I = DirAndFilenameToFilepathMap.begin(), E = DirAndFilenameToFilepathMap.end(); Index: lib/CodeGen/CodeGenPrepare.cpp =================================================================== --- lib/CodeGen/CodeGenPrepare.cpp +++ lib/CodeGen/CodeGenPrepare.cpp @@ -1843,7 +1843,7 @@ Inst->removeFromParent(); } - ~InstructionRemover() { delete Replacer; } + ~InstructionRemover() override { delete Replacer; } /// \brief Really remove the instruction. void commit() override { delete Inst; } Index: lib/CodeGen/CriticalAntiDepBreaker.h =================================================================== --- lib/CodeGen/CriticalAntiDepBreaker.h +++ lib/CodeGen/CriticalAntiDepBreaker.h @@ -69,7 +69,7 @@ public: CriticalAntiDepBreaker(MachineFunction& MFi, const RegisterClassInfo&); - ~CriticalAntiDepBreaker(); + ~CriticalAntiDepBreaker() override; /// Initialize anti-dep breaking for a new basic block. void StartBlock(MachineBasicBlock *BB) override; Index: lib/CodeGen/InlineSpiller.cpp =================================================================== --- lib/CodeGen/InlineSpiller.cpp +++ lib/CodeGen/InlineSpiller.cpp @@ -135,7 +135,7 @@ // Dead defs generated during spilling. SmallVector DeadDefs; - ~InlineSpiller() {} + ~InlineSpiller() override {} public: InlineSpiller(MachineFunctionPass &pass, MachineFunction &mf, VirtRegMap &vrm) Index: lib/CodeGen/LiveDebugVariables.h =================================================================== --- lib/CodeGen/LiveDebugVariables.h +++ lib/CodeGen/LiveDebugVariables.h @@ -38,7 +38,7 @@ static char ID; // Pass identification, replacement for typeid LiveDebugVariables(); - ~LiveDebugVariables(); + ~LiveDebugVariables() override; /// renameRegister - Move any user variables in OldReg to NewReg:SubIdx. /// @param OldReg Old virtual register that is going away. Index: lib/CodeGen/PostRASchedulerList.cpp =================================================================== --- lib/CodeGen/PostRASchedulerList.cpp +++ lib/CodeGen/PostRASchedulerList.cpp @@ -141,7 +141,7 @@ TargetSubtargetInfo::AntiDepBreakMode AntiDepMode, SmallVectorImpl &CriticalPathRCs); - ~SchedulePostRATDList(); + ~SchedulePostRATDList() override; /// startBlock - Initialize register live-range state for scheduling in /// this block. Index: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp =================================================================== --- lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -173,7 +173,7 @@ HazardRec = STI.getInstrInfo()->CreateTargetHazardRecognizer(&STI, this); } - ~ScheduleDAGRRList() { + ~ScheduleDAGRRList() override { delete HazardRec; delete AvailableQueue; } Index: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h =================================================================== --- lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h +++ lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h @@ -44,7 +44,7 @@ explicit ScheduleDAGSDNodes(MachineFunction &mf); - virtual ~ScheduleDAGSDNodes() {} + ~ScheduleDAGSDNodes() override {} /// Run - perform scheduling. /// Index: lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp =================================================================== --- lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp +++ lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp @@ -76,7 +76,7 @@ HazardRec = STI.getInstrInfo()->CreateTargetHazardRecognizer(&STI, this); } - ~ScheduleDAGVLIW() { + ~ScheduleDAGVLIW() override { delete HazardRec; delete AvailableQueue; } Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2560,7 +2560,7 @@ SelectionDAG::DAGUpdateListener(DAG), RecordedNodes(RN), MatchScopes(MS) { } - void NodeDeleted(SDNode *N, SDNode *E) { + void NodeDeleted(SDNode *N, SDNode *E) override { // Some early-returns here to avoid the search if we deleted the node or // if the update comes from MorphNodeTo (MorphNodeTo is the last thing we // do, so it's unnecessary to update matching state at that point). Index: lib/CodeGen/SpillPlacement.h =================================================================== --- lib/CodeGen/SpillPlacement.h +++ lib/CodeGen/SpillPlacement.h @@ -70,7 +70,7 @@ static char ID; // Pass identification, replacement for typeid. SpillPlacement() : MachineFunctionPass(ID), nodes(nullptr) {} - ~SpillPlacement() { releaseMemory(); } + ~SpillPlacement() override { releaseMemory(); } /// BorderConstraint - A basic block has separate constraints for entry and /// exit. Index: lib/CodeGen/WinEHPrepare.cpp =================================================================== --- lib/CodeGen/WinEHPrepare.cpp +++ lib/CodeGen/WinEHPrepare.cpp @@ -135,9 +135,9 @@ public: WinEHFrameVariableMaterializer(Function *OutlinedFn, FrameVarInfoMap &FrameVarInfo); - ~WinEHFrameVariableMaterializer() {} + ~WinEHFrameVariableMaterializer() override {} - virtual Value *materializeValueFor(Value *V) override; + Value *materializeValueFor(Value *V) override; void escapeCatchObject(Value *V); Index: lib/DebugInfo/DWARF/DWARFDebugFrame.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugFrame.cpp +++ lib/DebugInfo/DWARF/DWARFDebugFrame.cpp @@ -197,8 +197,7 @@ DataAlignmentFactor(DataAlignmentFactor), ReturnAddressRegister(ReturnAddressRegister) {} - ~CIE() { - } + ~CIE() override {} uint64_t getCodeAlignmentFactor() const { return CodeAlignmentFactor; } int64_t getDataAlignmentFactor() const { return DataAlignmentFactor; } @@ -245,8 +244,7 @@ InitialLocation(InitialLocation), AddressRange(AddressRange), LinkedCIE(Cie) {} - ~FDE() { - } + ~FDE() override {} CIE *getLinkedCIE() const { return LinkedCIE; } Index: lib/DebugInfo/PDB/PDBSymbolFunc.cpp =================================================================== --- lib/DebugInfo/PDB/PDBSymbolFunc.cpp +++ lib/DebugInfo/PDB/PDBSymbolFunc.cpp @@ -48,9 +48,10 @@ reset(); } - uint32_t getChildCount() const { return Args.size(); } + uint32_t getChildCount() const override { return Args.size(); } - std::unique_ptr getChildAtIndex(uint32_t Index) const { + std::unique_ptr + getChildAtIndex(uint32_t Index) const override { if (Index >= Args.size()) return nullptr; @@ -58,7 +59,7 @@ Args[Index]->getSymIndexId()); } - std::unique_ptr getNext() { + std::unique_ptr getNext() override { if (CurIter == Args.end()) return nullptr; const auto &Result = **CurIter; @@ -66,9 +67,9 @@ return Session.getConcreteSymbolById(Result.getSymIndexId()); } - void reset() { CurIter = Args.empty() ? Args.end() : Args.begin(); } + void reset() override { CurIter = Args.empty() ? Args.end() : Args.begin(); } - FunctionArgEnumerator *clone() const { + FunctionArgEnumerator *clone() const override { return new FunctionArgEnumerator(Session, Func); } Index: lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp =================================================================== --- lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp +++ lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp @@ -34,25 +34,27 @@ std::unique_ptr ArgEnumerator) : Session(PDBSession), Enumerator(std::move(ArgEnumerator)) {} - uint32_t getChildCount() const { return Enumerator->getChildCount(); } + uint32_t getChildCount() const override { + return Enumerator->getChildCount(); + } - std::unique_ptr getChildAtIndex(uint32_t Index) const { + std::unique_ptr getChildAtIndex(uint32_t Index) const override { auto FunctionArgSymbol = Enumerator->getChildAtIndex(Index); if (!FunctionArgSymbol) return nullptr; return Session.getSymbolById(FunctionArgSymbol->getTypeId()); } - std::unique_ptr getNext() { + std::unique_ptr getNext() override { auto FunctionArgSymbol = Enumerator->getNext(); if (!FunctionArgSymbol) return nullptr; return Session.getSymbolById(FunctionArgSymbol->getTypeId()); } - void reset() { Enumerator->reset(); } + void reset() override { Enumerator->reset(); } - MyType *clone() const { + MyType *clone() const override { std::unique_ptr Clone(Enumerator->clone()); return new FunctionArgEnumerator(Session, std::move(Clone)); } Index: lib/ExecutionEngine/ExecutionEngineBindings.cpp =================================================================== --- lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -351,7 +351,7 @@ public: SimpleBindingMemoryManager(const SimpleBindingMMFunctions& Functions, void *Opaque); - virtual ~SimpleBindingMemoryManager(); + ~SimpleBindingMemoryManager() override; uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, Index: lib/ExecutionEngine/GDBRegistrationListener.cpp =================================================================== --- lib/ExecutionEngine/GDBRegistrationListener.cpp +++ lib/ExecutionEngine/GDBRegistrationListener.cpp @@ -103,7 +103,7 @@ /// Unregisters each object that was previously registered and releases all /// internal resources. - virtual ~GDBJITRegistrationListener(); + ~GDBJITRegistrationListener() override; /// Creates an entry in the JIT registry for the buffer @p Object, /// which must contain an object file in executable memory with any Index: lib/ExecutionEngine/Interpreter/Interpreter.h =================================================================== --- lib/ExecutionEngine/Interpreter/Interpreter.h +++ lib/ExecutionEngine/Interpreter/Interpreter.h @@ -108,7 +108,7 @@ public: explicit Interpreter(std::unique_ptr M); - ~Interpreter(); + ~Interpreter() override; /// runAtExitHandlers - Run any functions registered by the program's calls to /// atexit(3), which we intercept and store in AtExitHandlers. Index: lib/ExecutionEngine/MCJIT/MCJIT.h =================================================================== --- lib/ExecutionEngine/MCJIT/MCJIT.h +++ lib/ExecutionEngine/MCJIT/MCJIT.h @@ -205,7 +205,7 @@ ModulePtrSet::iterator E); public: - ~MCJIT(); + ~MCJIT() override; /// @name ExecutionEngine interface implementation /// @{ Index: lib/ExecutionEngine/Orc/OrcMCJITReplacement.h =================================================================== --- lib/ExecutionEngine/Orc/OrcMCJITReplacement.h +++ lib/ExecutionEngine/Orc/OrcMCJITReplacement.h @@ -107,11 +107,12 @@ public: LinkingResolver(OrcMCJITReplacement &M) : M(M) {} - RuntimeDyld::SymbolInfo findSymbol(const std::string &Name) { + RuntimeDyld::SymbolInfo findSymbol(const std::string &Name) override { return M.findMangledSymbol(Name); } - RuntimeDyld::SymbolInfo findSymbolInLogicalDylib(const std::string &Name) { + RuntimeDyld::SymbolInfo + findSymbolInLogicalDylib(const std::string &Name) override { return M.ClientResolver->findSymbolInLogicalDylib(Name); } Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h @@ -100,7 +100,7 @@ public: RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver); - virtual ~RuntimeDyldELF(); + ~RuntimeDyldELF() override; std::unique_ptr loadObject(const object::ObjectFile &O) override; Index: lib/IR/LegacyPassManager.cpp =================================================================== --- lib/IR/LegacyPassManager.cpp +++ lib/IR/LegacyPassManager.cpp @@ -293,7 +293,7 @@ Pass(PT_PassManager, ID), PMDataManager() { } // Delete on the fly managers. - virtual ~MPPassManager() { + ~MPPassManager() override { for (std::map::iterator I = OnTheFlyManagers.begin(), E = OnTheFlyManagers.end(); I != E; ++I) { Index: lib/MC/ELFObjectWriter.cpp =================================================================== --- lib/MC/ELFObjectWriter.cpp +++ lib/MC/ELFObjectWriter.cpp @@ -198,7 +198,7 @@ MCObjectWriter::reset(); } - virtual ~ELFObjectWriter(); + ~ELFObjectWriter() override; void WriteWord(uint64_t W) { if (is64Bit()) Index: lib/MC/MCParser/AsmParser.cpp =================================================================== --- lib/MC/MCParser/AsmParser.cpp +++ lib/MC/MCParser/AsmParser.cpp @@ -175,7 +175,7 @@ public: AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out, const MCAsmInfo &MAI); - virtual ~AsmParser(); + ~AsmParser() override; bool Run(bool NoInitialTextSection, bool NoFinalize = false) override; Index: lib/Support/CommandLine.cpp =================================================================== --- lib/Support/CommandLine.cpp +++ lib/Support/CommandLine.cpp @@ -784,7 +784,7 @@ std::vector Dups; public: - ~StrDupSaver() { + ~StrDupSaver() override { for (std::vector::iterator I = Dups.begin(), E = Dups.end(); I != E; ++I) { char *Dup = *I; Index: lib/Support/DataStream.cpp =================================================================== --- lib/Support/DataStream.cpp +++ lib/Support/DataStream.cpp @@ -54,9 +54,7 @@ int Fd; public: DataFileStreamer() : Fd(0) {} - virtual ~DataFileStreamer() { - close(Fd); - } + ~DataFileStreamer() override { close(Fd); } size_t GetBytes(unsigned char *buf, size_t len) override { NumStreamFetches++; return read(Fd, buf, len); Index: lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp @@ -26,7 +26,7 @@ public: AArch64ELFObjectWriter(uint8_t OSABI, bool IsLittleEndian); - virtual ~AArch64ELFObjectWriter(); + ~AArch64ELFObjectWriter() override; protected: unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp @@ -94,7 +94,7 @@ : MCELFStreamer(Context, TAB, OS, Emitter), MappingSymbolCounter(0), LastEMS(EMS_None) {} - ~AArch64ELFStreamer() {} + ~AArch64ELFStreamer() override {} void ChangeSection(const MCSection *Section, const MCExpr *Subsection) override { Index: lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp @@ -40,7 +40,7 @@ public: AArch64MCCodeEmitter(const MCInstrInfo &mcii, MCContext &ctx) : Ctx(ctx) {} - ~AArch64MCCodeEmitter() {} + ~AArch64MCCodeEmitter() override {} // getBinaryCodeForInstr - TableGen'erated function for getting the // binary encoding for an instruction. Index: lib/Target/ARM/ARMConstantPoolValue.h =================================================================== --- lib/Target/ARM/ARMConstantPoolValue.h +++ lib/Target/ARM/ARMConstantPoolValue.h @@ -86,7 +86,7 @@ } public: - virtual ~ARMConstantPoolValue(); + ~ARMConstantPoolValue() override; ARMCP::ARMCPModifier getModifier() const { return Modifier; } const char *getModifierText() const; Index: lib/Target/ARM/Disassembler/ARMDisassembler.cpp =================================================================== --- lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -91,7 +91,7 @@ MCDisassembler(STI, Ctx) { } - ~ARMDisassembler() {} + ~ARMDisassembler() override {} DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, @@ -106,7 +106,7 @@ MCDisassembler(STI, Ctx) { } - ~ThumbDisassembler() {} + ~ThumbDisassembler() override {} DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp @@ -32,7 +32,7 @@ public: ARMELFObjectWriter(uint8_t OSABI); - virtual ~ARMELFObjectWriter(); + ~ARMELFObjectWriter() override; unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; Index: lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp @@ -48,7 +48,7 @@ : MCII(mcii), CTX(ctx), IsLittleEndian(IsLittle) { } - ~ARMMCCodeEmitter() {} + ~ARMMCCodeEmitter() override {} bool isThumb(const MCSubtargetInfo &STI) const { return (STI.getFeatureBits() & ARM::ModeThumb) != 0; Index: lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp @@ -26,7 +26,7 @@ : MCWinCOFFObjectTargetWriter(COFF::IMAGE_FILE_MACHINE_ARMNT) { assert(!Is64Bit && "AArch64 support not yet implemented"); } - virtual ~ARMWinCOFFObjectWriter() { } + ~ARMWinCOFFObjectWriter() override {} unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection, Index: lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp =================================================================== --- lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp +++ lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp @@ -27,8 +27,8 @@ public: HexagonELFObjectWriter(uint8_t OSABI, StringRef C); - virtual unsigned GetRelocType(MCValue const &Target, MCFixup const &Fixup, - bool IsPCRel) const override; + unsigned GetRelocType(MCValue const &Target, MCFixup const &Fixup, + bool IsPCRel) const override; }; } Index: lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp +++ lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp @@ -27,7 +27,7 @@ MipsELFObjectWriter(bool _is64Bit, uint8_t OSABI, bool _isN64, bool IsLittleEndian); - virtual ~MipsELFObjectWriter(); + ~MipsELFObjectWriter() override; unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; Index: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h +++ lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h @@ -43,7 +43,7 @@ MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle) : MCII(mcii), Ctx(Ctx_), IsLittleEndian(IsLittle) {} - ~MipsMCCodeEmitter() {} + ~MipsMCCodeEmitter() override {} void EmitByte(unsigned char C, raw_ostream &OS) const; Index: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp +++ lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp @@ -40,7 +40,7 @@ MCCodeEmitter *Emitter) : MipsELFStreamer(Context, TAB, OS, Emitter), PendingCall(false) {} - ~MipsNaClELFStreamer() {} + ~MipsNaClELFStreamer() override {} private: // Whether we started the sandboxing sequence for calls. Calls are bundled Index: lib/Target/Mips/MipsOptionRecord.h =================================================================== --- lib/Target/Mips/MipsOptionRecord.h +++ lib/Target/Mips/MipsOptionRecord.h @@ -52,7 +52,7 @@ COP2RegClass = &(TRI->getRegClass(Mips::COP2RegClassID)); COP3RegClass = &(TRI->getRegClass(Mips::COP3RegClassID)); } - ~MipsRegInfoRecord() {} + ~MipsRegInfoRecord() override {} void EmitMipsOptionRecord() override; void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo); Index: lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp =================================================================== --- lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp +++ lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp @@ -25,7 +25,7 @@ public: PPCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~PPCDisassembler() {} + ~PPCDisassembler() override {} DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp =================================================================== --- lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp +++ lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp @@ -44,7 +44,7 @@ : MCII(mcii), CTX(ctx), IsLittleEndian(ctx.getAsmInfo()->isLittleEndian()) {} - ~PPCMCCodeEmitter() {} + ~PPCMCCodeEmitter() override {} unsigned getDirectBrEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, Index: lib/Target/PowerPC/PPCTargetStreamer.h =================================================================== --- lib/Target/PowerPC/PPCTargetStreamer.h +++ lib/Target/PowerPC/PPCTargetStreamer.h @@ -16,7 +16,7 @@ class PPCTargetStreamer : public MCTargetStreamer { public: PPCTargetStreamer(MCStreamer &S); - virtual ~PPCTargetStreamer(); + ~PPCTargetStreamer() override; virtual void emitTCEntry(const MCSymbol &S) = 0; virtual void emitMachine(StringRef CPU) = 0; virtual void emitAbiVersion(int AbiVersion) = 0; Index: lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp =================================================================== --- lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp +++ lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp @@ -49,7 +49,7 @@ MCContext &ctx) : MCII(mcii), MRI(mri), Ctx(ctx) { } - ~SIMCCodeEmitter() { } + ~SIMCCodeEmitter() override {} /// \brief Encode the instruction and write it to the OS. void EncodeInstruction(const MCInst &MI, raw_ostream &OS, Index: lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp =================================================================== --- lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp +++ lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp @@ -26,7 +26,8 @@ Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, /*HasRelocationAddend*/ true) {} - virtual ~SparcELFObjectWriter() {} + ~SparcELFObjectWriter() override {} + protected: unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; Index: lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp =================================================================== --- lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp +++ lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp @@ -38,7 +38,7 @@ public: SparcMCCodeEmitter(MCContext &ctx): Ctx(ctx) {} - ~SparcMCCodeEmitter() {} + ~SparcMCCodeEmitter() override {} void EncodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, Index: lib/Target/Sparc/SparcSelectionDAGInfo.h =================================================================== --- lib/Target/Sparc/SparcSelectionDAGInfo.h +++ lib/Target/Sparc/SparcSelectionDAGInfo.h @@ -23,7 +23,7 @@ class SparcSelectionDAGInfo : public TargetSelectionDAGInfo { public: explicit SparcSelectionDAGInfo(const DataLayout &DL); - ~SparcSelectionDAGInfo(); + ~SparcSelectionDAGInfo() override; }; } Index: lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp =================================================================== --- lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp +++ lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp @@ -25,7 +25,7 @@ public: SystemZDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~SystemZDisassembler() {} + ~SystemZDisassembler() override {} DecodeStatus getInstruction(MCInst &instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp =================================================================== --- lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp +++ lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp @@ -32,7 +32,7 @@ : MCII(mcii), Ctx(ctx) { } - ~SystemZMCCodeEmitter() {} + ~SystemZMCCodeEmitter() override {} // OVerride MCCodeEmitter. void EncodeInstruction(const MCInst &MI, raw_ostream &OS, Index: lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp =================================================================== --- lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp +++ lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp @@ -20,7 +20,7 @@ public: SystemZObjectWriter(uint8_t OSABI); - virtual ~SystemZObjectWriter(); + ~SystemZObjectWriter() override; protected: // Override MCELFObjectTargetWriter. Index: lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +++ lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp @@ -22,7 +22,8 @@ public: X86ELFObjectWriter(bool IsELF64, uint8_t OSABI, uint16_t EMachine); - virtual ~X86ELFObjectWriter(); + ~X86ELFObjectWriter() override; + protected: unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; Index: lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +++ lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp @@ -39,7 +39,7 @@ : MCII(mcii), Ctx(ctx) { } - ~X86MCCodeEmitter() {} + ~X86MCCodeEmitter() override {} bool is64BitMode(const MCSubtargetInfo &STI) const { return (STI.getFeatureBits() & X86::Mode64Bit) != 0; Index: lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp +++ lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp @@ -25,7 +25,7 @@ class X86WinCOFFObjectWriter : public MCWinCOFFObjectTargetWriter { public: X86WinCOFFObjectWriter(bool Is64Bit); - virtual ~X86WinCOFFObjectWriter(); + ~X86WinCOFFObjectWriter() override; unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection, Index: lib/Target/XCore/XCoreTargetStreamer.h =================================================================== --- lib/Target/XCore/XCoreTargetStreamer.h +++ lib/Target/XCore/XCoreTargetStreamer.h @@ -16,7 +16,7 @@ class XCoreTargetStreamer : public MCTargetStreamer { public: XCoreTargetStreamer(MCStreamer &S); - virtual ~XCoreTargetStreamer(); + ~XCoreTargetStreamer() override; virtual void emitCCTopData(StringRef Name) = 0; virtual void emitCCTopFunction(StringRef Name) = 0; virtual void emitCCBottomData(StringRef Name) = 0; Index: lib/Transforms/Scalar/AlignmentFromAssumptions.cpp =================================================================== --- lib/Transforms/Scalar/AlignmentFromAssumptions.cpp +++ lib/Transforms/Scalar/AlignmentFromAssumptions.cpp @@ -50,9 +50,9 @@ initializeAlignmentFromAssumptionsPass(*PassRegistry::getPassRegistry()); } - bool runOnFunction(Function &F); + bool runOnFunction(Function &F) override; - virtual void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired(); AU.addRequired(); AU.addRequired(); Index: tools/bugpoint/ToolRunner.h =================================================================== --- tools/bugpoint/ToolRunner.h +++ tools/bugpoint/ToolRunner.h @@ -165,7 +165,7 @@ ToolArgs.clear(); if (Args) ToolArgs = *Args; } - ~LLC() { delete gcc; } + ~LLC() override { delete gcc; } /// compileProgram - Compile the specified program from bitcode to executable /// code. This does not produce any output, it is only used when debugging Index: tools/lli/RemoteMemoryManager.h =================================================================== --- tools/lli/RemoteMemoryManager.h +++ tools/lli/RemoteMemoryManager.h @@ -64,7 +64,7 @@ public: RemoteMemoryManager() : Target(nullptr) {} - virtual ~RemoteMemoryManager(); + ~RemoteMemoryManager() override; uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, Index: tools/lli/RemoteTargetExternal.h =================================================================== --- tools/lli/RemoteTargetExternal.h +++ tools/lli/RemoteTargetExternal.h @@ -106,7 +106,7 @@ void stop() override; RemoteTargetExternal(std::string &Name) : RemoteTarget(), ChildName(Name) {} - virtual ~RemoteTargetExternal() {} + ~RemoteTargetExternal() override {} private: std::string ChildName; Index: tools/lli/lli.cpp =================================================================== --- tools/lli/lli.cpp +++ tools/lli/lli.cpp @@ -271,7 +271,7 @@ this->CacheDir[this->CacheDir.size() - 1] != '/') this->CacheDir += '/'; } - virtual ~LLIObjectCache() {} + ~LLIObjectCache() override {} void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) override { const std::string ModuleID = M->getModuleIdentifier(); Index: unittests/ADT/DAGDeltaAlgorithmTest.cpp =================================================================== --- unittests/ADT/DAGDeltaAlgorithmTest.cpp +++ unittests/ADT/DAGDeltaAlgorithmTest.cpp @@ -22,7 +22,7 @@ unsigned NumTests; protected: - virtual bool ExecuteOneTest(const changeset_ty &Changes) { + bool ExecuteOneTest(const changeset_ty &Changes) override { ++NumTests; return std::includes(Changes.begin(), Changes.end(), FailingSet.begin(), FailingSet.end()); Index: unittests/ADT/DeltaAlgorithmTest.cpp =================================================================== --- unittests/ADT/DeltaAlgorithmTest.cpp +++ unittests/ADT/DeltaAlgorithmTest.cpp @@ -37,7 +37,7 @@ unsigned NumTests; protected: - virtual bool ExecuteOneTest(const changeset_ty &Changes) { + bool ExecuteOneTest(const changeset_ty &Changes) override { ++NumTests; return std::includes(Changes.begin(), Changes.end(), FailingSet.begin(), FailingSet.end()); Index: unittests/ADT/SmallVectorTest.cpp =================================================================== --- unittests/ADT/SmallVectorTest.cpp +++ unittests/ADT/SmallVectorTest.cpp @@ -156,10 +156,7 @@ class SmallVectorTestBase : public testing::Test { protected: - - void SetUp() { - Constructable::reset(); - } + void SetUp() override { Constructable::reset(); } template void assertEmpty(VectorT & v) { Index: unittests/Analysis/CFGTest.cpp =================================================================== --- unittests/Analysis/CFGTest.cpp +++ unittests/Analysis/CFGTest.cpp @@ -78,13 +78,13 @@ return 0; } - void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesAll(); AU.addRequired(); AU.addRequired(); } - bool runOnFunction(Function &F) { + bool runOnFunction(Function &F) override { if (!F.hasName() || F.getName() != "test") return false; Index: unittests/Analysis/ScalarEvolutionTest.cpp =================================================================== --- unittests/Analysis/ScalarEvolutionTest.cpp +++ unittests/Analysis/ScalarEvolutionTest.cpp @@ -25,7 +25,7 @@ class ScalarEvolutionsTest : public testing::Test { protected: ScalarEvolutionsTest() : M("", Context), SE(*new ScalarEvolution) {} - ~ScalarEvolutionsTest() { + ~ScalarEvolutionsTest() override { // Manually clean up, since we allocated new SCEV objects after the // pass was finished. SE.releaseMemory(); Index: unittests/ExecutionEngine/ExecutionEngineTest.cpp =================================================================== --- unittests/ExecutionEngine/ExecutionEngineTest.cpp +++ unittests/ExecutionEngine/ExecutionEngineTest.cpp @@ -33,7 +33,7 @@ Engine.reset(EngineBuilder(std::move(Owner)).setErrorStr(&Error).create()); } - virtual void SetUp() { + void SetUp() override { ASSERT_TRUE(Engine.get() != nullptr) << "EngineBuilder returned error: '" << Error << "'"; } Index: unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp =================================================================== --- unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp +++ unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp @@ -85,13 +85,11 @@ ReservedCodeSize(0), UsedCodeSize(0), ReservedDataSizeRO(0), UsedDataSizeRO(0), ReservedDataSizeRW(0), UsedDataSizeRW(0) { } - - virtual bool needsToReserveAllocationSpace() { - return true; - } - virtual void reserveAllocationSpace( - uintptr_t CodeSize, uintptr_t DataSizeRO, uintptr_t DataSizeRW) { + bool needsToReserveAllocationSpace() override { return true; } + + void reserveAllocationSpace(uintptr_t CodeSize, uintptr_t DataSizeRO, + uintptr_t DataSizeRW) override { ReservedCodeSize = CodeSize; ReservedDataSizeRO = DataSizeRO; ReservedDataSizeRW = DataSizeRW; @@ -103,15 +101,17 @@ *UsedSize = AlignedBegin + AlignedSize; } - virtual uint8_t* allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, StringRef SectionName, bool IsReadOnly) { + uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, + unsigned SectionID, StringRef SectionName, + bool IsReadOnly) override { useSpace(IsReadOnly ? &UsedDataSizeRO : &UsedDataSizeRW, Size, Alignment); return SectionMemoryManager::allocateDataSection(Size, Alignment, SectionID, SectionName, IsReadOnly); } - uint8_t* allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, StringRef SectionName) { + uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, + unsigned SectionID, + StringRef SectionName) override { useSpace(&UsedCodeSize, Size, Alignment); return SectionMemoryManager::allocateCodeSection(Size, Alignment, SectionID, SectionName); @@ -141,8 +141,8 @@ // that they will fail the MCJIT C API tests. UnsupportedEnvironments.push_back(Triple::Cygnus); } - - virtual void SetUp() { + + void SetUp() override { didCallAllocateCodeSection = false; didAllocateCompactUnwindSection = false; didCallYield = false; @@ -151,8 +151,8 @@ Engine = nullptr; Error = nullptr; } - - virtual void TearDown() { + + void TearDown() override { if (Engine) LLVMDisposeExecutionEngine(Engine); else if (Module) Index: unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp =================================================================== --- unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp +++ unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp @@ -33,7 +33,7 @@ ObjMap[ModuleID] = copyBuffer(Obj); } - virtual std::unique_ptr getObject(const Module* M) override { + std::unique_ptr getObject(const Module *M) override { const MemoryBuffer* BufferFound = getObjectInternal(M); ModulesLookedUp.insert(M->getModuleIdentifier()); if (!BufferFound) @@ -84,7 +84,7 @@ ReplacementRC = 7 }; - virtual void SetUp() { + void SetUp() override { M.reset(createEmptyModule("
")); Main = insertMainFunction(M.get(), OriginalRC); } Index: unittests/ExecutionEngine/MCJIT/MCJITTest.cpp =================================================================== --- unittests/ExecutionEngine/MCJIT/MCJITTest.cpp +++ unittests/ExecutionEngine/MCJIT/MCJITTest.cpp @@ -22,7 +22,7 @@ class MCJITTest : public testing::Test, public MCJITTestBase { protected: - virtual void SetUp() { M.reset(createEmptyModule("
")); } + void SetUp() override { M.reset(createEmptyModule("
")); } }; // FIXME: Ensure creating an execution engine does not crash when constructed Index: unittests/IR/DominatorTreeTest.cpp =================================================================== --- unittests/IR/DominatorTreeTest.cpp +++ unittests/IR/DominatorTreeTest.cpp @@ -25,7 +25,7 @@ namespace { struct DPass : public FunctionPass { static char ID; - virtual bool runOnFunction(Function &F) { + bool runOnFunction(Function &F) override { DominatorTree *DT = &getAnalysis().getDomTree(); PostDominatorTree *PDT = &getAnalysis(); @@ -176,7 +176,7 @@ return false; } - virtual void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired(); AU.addRequired(); } Index: unittests/IR/IRBuilderTest.cpp =================================================================== --- unittests/IR/IRBuilderTest.cpp +++ unittests/IR/IRBuilderTest.cpp @@ -26,7 +26,7 @@ class IRBuilderTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { M.reset(new Module("MyModule", Ctx)); FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx), /*isVarArg=*/false); @@ -36,7 +36,7 @@ GlobalValue::ExternalLinkage, nullptr); } - virtual void TearDown() { + void TearDown() override { BB = nullptr; M.reset(); } Index: unittests/IR/ValueHandleTest.cpp =================================================================== --- unittests/IR/ValueHandleTest.cpp +++ unittests/IR/ValueHandleTest.cpp @@ -244,8 +244,11 @@ RecordingVH(Value *V) : CallbackVH(V), DeletedCalls(0), AURWCalls(0) {} private: - virtual void deleted() { DeletedCalls++; CallbackVH::deleted(); } - virtual void allUsesReplacedWith(Value *) { AURWCalls++; } + void deleted() override { + DeletedCalls++; + CallbackVH::deleted(); + } + void allUsesReplacedWith(Value *) override { AURWCalls++; } }; RecordingVH RVH; @@ -268,8 +271,11 @@ : CallbackVH(V), DeletedCalls(0), AURWArgument(nullptr) {} private: - virtual void deleted() { DeletedCalls++; CallbackVH::deleted(); } - virtual void allUsesReplacedWith(Value *new_value) { + void deleted() override { + DeletedCalls++; + CallbackVH::deleted(); + } + void allUsesReplacedWith(Value *new_value) override { EXPECT_EQ(nullptr, AURWArgument); AURWArgument = new_value; } @@ -298,11 +304,11 @@ Context(&getGlobalContext()) {} private: - virtual void deleted() { + void deleted() override { getValPtr()->replaceAllUsesWith(Constant::getNullValue(Type::getInt32Ty(getGlobalContext()))); setValPtr(nullptr); } - virtual void allUsesReplacedWith(Value *new_value) { + void allUsesReplacedWith(Value *new_value) override { ASSERT_TRUE(nullptr != getValPtr()); EXPECT_EQ(1U, getValPtr()->getNumUses()); EXPECT_EQ(nullptr, AURWArgument); @@ -341,12 +347,12 @@ setValPtr(V); ToClear[1].reset(new WeakVH(V)); } - virtual void deleted() { + void deleted() override { ToClear[0].reset(); ToClear[1].reset(); CallbackVH::deleted(); } - virtual void allUsesReplacedWith(Value *) { + void allUsesReplacedWith(Value *) override { ToClear[0].reset(); ToClear[1].reset(); } @@ -388,7 +394,7 @@ ToClear[1] = &A1; } - virtual void deleted() { + void deleted() override { *ToClear[0] = nullptr; *ToClear[1] = nullptr; CallbackVH::deleted(); Index: unittests/LineEditor/LineEditor.cpp =================================================================== --- unittests/LineEditor/LineEditor.cpp +++ unittests/LineEditor/LineEditor.cpp @@ -29,7 +29,7 @@ LE = new LineEditor("test", HistPath); } - ~LineEditorTest() { + ~LineEditorTest() override { delete LE; sys::fs::remove(HistPath.str()); } Index: unittests/Linker/LinkModulesTest.cpp =================================================================== --- unittests/Linker/LinkModulesTest.cpp +++ unittests/Linker/LinkModulesTest.cpp @@ -23,7 +23,7 @@ class LinkModuleTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { M.reset(new Module("MyModule", Ctx)); FunctionType *FTy = FunctionType::get( Type::getInt8PtrTy(Ctx), Type::getInt32Ty(Ctx), false /*=isVarArg*/); @@ -56,7 +56,7 @@ GV->setInitializer(ConstantArray::get(AT, Init)); } - virtual void TearDown() { M.reset(); } + void TearDown() override { M.reset(); } LLVMContext Ctx; std::unique_ptr M; Index: unittests/Support/AlignOfTest.cpp =================================================================== --- unittests/Support/AlignOfTest.cpp +++ unittests/Support/AlignOfTest.cpp @@ -61,12 +61,22 @@ struct D9 : S1, D1 { S1 s1; }; struct V1 { virtual ~V1(); }; struct V2 { int x; virtual ~V2(); }; -struct V3 : V1 { virtual ~V3(); }; -struct V4 : virtual V2 { int y; virtual ~V4(); }; -struct V5 : V4, V3 { double z; virtual ~V5(); }; +struct V3 : V1 { + ~V3() override; +}; +struct V4 : virtual V2 { int y; + ~V4() override; +}; +struct V5 : V4, V3 { double z; + ~V5() override; +}; struct V6 : S1 { virtual ~V6(); }; -struct V7 : virtual V2, virtual V6 { virtual ~V7(); }; -struct V8 : V5, virtual V6, V7 { double zz; virtual ~V8(); }; +struct V7 : virtual V2, virtual V6 { + ~V7() override; +}; +struct V8 : V5, virtual V6, V7 { double zz; + ~V8() override; +}; double S6::f() { return 0.0; } float D2::g() { return 0.0f; } Index: unittests/Support/CommandLineTest.cpp =================================================================== --- unittests/Support/CommandLineTest.cpp +++ unittests/Support/CommandLineTest.cpp @@ -65,9 +65,7 @@ StackOption(const M0t &M0, const M1t &M1, const M2t &M2, const M3t &M3) : Base(M0, M1, M2, M3) {} - ~StackOption() { - this->removeArgument(); - } + ~StackOption() override { this->removeArgument(); } }; Index: unittests/Support/MemoryBufferTest.cpp =================================================================== --- unittests/Support/MemoryBufferTest.cpp +++ unittests/Support/MemoryBufferTest.cpp @@ -26,7 +26,7 @@ : data("this is some data") { } - virtual void SetUp() { } + void SetUp() override {} /// Common testing for different modes of getOpenFileSlice. /// Creates a temporary file with known contents, and uses Index: unittests/Support/Path.cpp =================================================================== --- unittests/Support/Path.cpp +++ unittests/Support/Path.cpp @@ -308,7 +308,7 @@ /// be placed. It is removed at the end of each test (must be empty). SmallString<128> TestDirectory; - virtual void SetUp() { + void SetUp() override { ASSERT_NO_ERROR( fs::createUniqueDirectory("file-system-test", TestDirectory)); // We don't care about this specific file. @@ -316,9 +316,7 @@ errs().flush(); } - virtual void TearDown() { - ASSERT_NO_ERROR(fs::remove(TestDirectory.str())); - } + void TearDown() override { ASSERT_NO_ERROR(fs::remove(TestDirectory.str())); } }; TEST_F(FileSystemTest, Unique) { Index: unittests/Transforms/Utils/Cloning.cpp =================================================================== --- unittests/Transforms/Utils/Cloning.cpp +++ unittests/Transforms/Utils/Cloning.cpp @@ -31,9 +31,7 @@ class CloneInstruction : public ::testing::Test { protected: - virtual void SetUp() { - V = nullptr; - } + void SetUp() override { V = nullptr; } template T *clone(T *V1) { @@ -47,7 +45,7 @@ DeleteContainerPointers(Clones); } - virtual void TearDown() { + void TearDown() override { eraseClones(); DeleteContainerPointers(Orig); delete V; @@ -206,16 +204,14 @@ class CloneFunc : public ::testing::Test { protected: - virtual void SetUp() { + void SetUp() override { SetupModule(); CreateOldFunc(); CreateNewFunc(); SetupFinder(); } - virtual void TearDown() { - delete Finder; - } + void TearDown() override { delete Finder; } void SetupModule() { M = new Module("", C); Index: utils/TableGen/DAGISelMatcher.h =================================================================== --- utils/TableGen/DAGISelMatcher.h +++ utils/TableGen/DAGISelMatcher.h @@ -194,7 +194,7 @@ ScopeMatcher(ArrayRef children) : Matcher(Scope), Children(children.begin(), children.end()) { } - virtual ~ScopeMatcher(); + ~ScopeMatcher() override; unsigned getNumChildren() const { return Children.size(); } @@ -507,7 +507,7 @@ public: SwitchOpcodeMatcher(ArrayRef > cases) : Matcher(SwitchOpcode), Cases(cases.begin(), cases.end()) {} - virtual ~SwitchOpcodeMatcher(); + ~SwitchOpcodeMatcher() override; static inline bool classof(const Matcher *N) { return N->getKind() == SwitchOpcode; @@ -561,7 +561,7 @@ public: SwitchTypeMatcher(ArrayRef > cases) : Matcher(SwitchType), Cases(cases.begin(), cases.end()) {} - virtual ~SwitchTypeMatcher(); + ~SwitchTypeMatcher() override; static inline bool classof(const Matcher *N) { return N->getKind() == SwitchType; Index: utils/unittest/googletest/include/gtest/gtest-spi.h =================================================================== --- utils/unittest/googletest/include/gtest/gtest-spi.h +++ utils/unittest/googletest/include/gtest/gtest-spi.h @@ -68,14 +68,15 @@ TestPartResultArray* result); // The d'tor restores the previous test part result reporter. - virtual ~ScopedFakeTestPartResultReporter(); + ~ScopedFakeTestPartResultReporter() override; // Appends the TestPartResult object to the TestPartResultArray // received in the constructor. // // This method is from the TestPartResultReporterInterface // interface. - virtual void ReportTestPartResult(const TestPartResult& result); + void ReportTestPartResult(const TestPartResult &result) override; + private: void Init(); Index: utils/unittest/googletest/include/gtest/gtest-test-part.h =================================================================== --- utils/unittest/googletest/include/gtest/gtest-test-part.h +++ utils/unittest/googletest/include/gtest/gtest-test-part.h @@ -159,8 +159,8 @@ : public TestPartResultReporterInterface { public: HasNewFatalFailureHelper(); - virtual ~HasNewFatalFailureHelper(); - virtual void ReportTestPartResult(const TestPartResult& result); + ~HasNewFatalFailureHelper() override; + void ReportTestPartResult(const TestPartResult &result) override; bool has_new_fatal_failure() const { return has_new_fatal_failure_; } private: bool has_new_fatal_failure_; Index: utils/unittest/googletest/include/gtest/gtest.h =================================================================== --- utils/unittest/googletest/include/gtest/gtest.h +++ utils/unittest/googletest/include/gtest/gtest.h @@ -982,21 +982,22 @@ class EmptyTestEventListener : public TestEventListener { virtual void anchor(); public: - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} - virtual void OnTestStart(const TestInfo& /*test_info*/) {} - virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {} - virtual void OnTestEnd(const TestInfo& /*test_info*/) {} - virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} - virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {} - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, - int /*iteration*/) {} - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} + void OnTestProgramStart(const UnitTest & /*unit_test*/) override {} + void OnTestIterationStart(const UnitTest & /*unit_test*/, + int /*iteration*/) override {} + void OnEnvironmentsSetUpStart(const UnitTest & /*unit_test*/) override {} + void OnEnvironmentsSetUpEnd(const UnitTest & /*unit_test*/) override {} + void OnTestCaseStart(const TestCase & /*test_case*/) override {} + void OnTestStart(const TestInfo & /*test_info*/) override {} + void OnTestPartResult(const TestPartResult & /*test_part_result*/) override { + } + void OnTestEnd(const TestInfo & /*test_info*/) override {} + void OnTestCaseEnd(const TestCase & /*test_case*/) override {} + void OnEnvironmentsTearDownStart(const UnitTest & /*unit_test*/) override {} + void OnEnvironmentsTearDownEnd(const UnitTest & /*unit_test*/) override {} + void OnTestIterationEnd(const UnitTest & /*unit_test*/, + int /*iteration*/) override {} + void OnTestProgramEnd(const UnitTest & /*unit_test*/) override {} }; // TestEventListeners lets users add listeners to track events in Google Test. Index: utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h +++ utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -147,8 +147,8 @@ // A concrete DeathTestFactory implementation for normal use. class DefaultDeathTestFactory : public DeathTestFactory { public: - virtual bool Create(const char* statement, const RE* regex, - const char* file, int line, DeathTest** test); + bool Create(const char *statement, const RE *regex, const char *file, + int line, DeathTest **test) override; }; // Returns true if exit_status describes a process that was terminated Index: utils/unittest/googletest/include/gtest/internal/gtest-internal.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -555,7 +555,7 @@ template class TestFactoryImpl : public TestFactoryBase { public: - virtual Test* CreateTest() { return new TestClass; } + Test *CreateTest() override { return new TestClass; } }; #if GTEST_OS_WINDOWS Index: utils/unittest/googletest/include/gtest/internal/gtest-param-util.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-param-util.h +++ utils/unittest/googletest/include/gtest/internal/gtest-param-util.h @@ -270,12 +270,12 @@ template ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) : container_(begin, end) {} - virtual ~ValuesInIteratorRangeGenerator() {} + ~ValuesInIteratorRangeGenerator() override {} - virtual ParamIteratorInterface* Begin() const { + ParamIteratorInterface *Begin() const override { return new Iterator(this, container_.begin()); } - virtual ParamIteratorInterface* End() const { + ParamIteratorInterface *End() const override { return new Iterator(this, container_.end()); } @@ -287,16 +287,16 @@ Iterator(const ParamGeneratorInterface* base, typename ContainerType::const_iterator iterator) : base_(base), iterator_(iterator) {} - virtual ~Iterator() {} + ~Iterator() override {} - virtual const ParamGeneratorInterface* BaseGenerator() const { + const ParamGeneratorInterface *BaseGenerator() const override { return base_; } - virtual void Advance() { + void Advance() override { ++iterator_; value_.reset(); } - virtual ParamIteratorInterface* Clone() const { + ParamIteratorInterface *Clone() const override { return new Iterator(*this); } // We need to use cached value referenced by iterator_ because *iterator_ @@ -306,12 +306,12 @@ // can advance iterator_ beyond the end of the range, and we cannot // detect that fact. The client code, on the other hand, is // responsible for not calling Current() on an out-of-range iterator. - virtual const T* Current() const { + const T *Current() const override { if (value_.get() == NULL) value_.reset(new T(*iterator_)); return value_.get(); } - virtual bool Equals(const ParamIteratorInterface& other) const { + bool Equals(const ParamIteratorInterface &other) const override { // Having the same base generator guarantees that the other // iterator is of the same type and we can downcast. GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) @@ -355,7 +355,7 @@ typedef typename TestClass::ParamType ParamType; explicit ParameterizedTestFactory(ParamType parameter) : parameter_(parameter) {} - virtual Test* CreateTest() { + Test *CreateTest() override { TestClass::SetParam(¶meter_); return new TestClass(); } @@ -394,7 +394,7 @@ TestMetaFactory() {} - virtual TestFactoryBase* CreateTestFactory(ParamType parameter) { + TestFactoryBase *CreateTestFactory(ParamType parameter) override { return new ParameterizedTestFactory(parameter); } @@ -454,9 +454,9 @@ : test_case_name_(name) {} // Test case base name for display purposes. - virtual const string& GetTestCaseName() const { return test_case_name_; } + const string &GetTestCaseName() const override { return test_case_name_; } // Test case id to verify identity. - virtual TypeId GetTestCaseTypeId() const { return GetTypeId(); } + TypeId GetTestCaseTypeId() const override { return GetTypeId(); } // TEST_P macro uses AddTestPattern() to record information // about a single test in a LocalTestInfo structure. // test_case_name is the base name of the test case (without invocation @@ -484,7 +484,7 @@ // This method should not be called more then once on any single // instance of a ParameterizedTestCaseInfoBase derived class. // UnitTest has a guard to prevent from calling this method more then once. - virtual void RegisterTests() { + void RegisterTests() override { for (typename TestInfoContainer::iterator test_it = tests_.begin(); test_it != tests_.end(); ++test_it) { linked_ptr test_info = *test_it; Index: utils/unittest/googletest/include/gtest/internal/gtest-port.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-port.h +++ utils/unittest/googletest/include/gtest/internal/gtest-port.h @@ -1165,7 +1165,7 @@ GTEST_CHECK_POSIX_SUCCESS_( pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base)); } - ~ThreadWithParam() { Join(); } + ~ThreadWithParam() override { Join(); } void Join() { if (!finished_) { @@ -1174,7 +1174,7 @@ } } - virtual void Run() { + void Run() override { if (thread_can_start_ != NULL) thread_can_start_->WaitForNotification(); func_(param_); Index: utils/unittest/googletest/src/gtest-death-test.cc =================================================================== --- utils/unittest/googletest/src/gtest-death-test.cc +++ utils/unittest/googletest/src/gtest-death-test.cc @@ -334,10 +334,10 @@ write_fd_(-1) {} // read_fd_ is expected to be closed and cleared by a derived class. - ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } + ~DeathTestImpl() override { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } - void Abort(AbortReason reason); - virtual bool Passed(bool status_ok); + void Abort(AbortReason reason) override; + bool Passed(bool status_ok) override; const char* statement() const { return statement_; } const RE* regex() const { return regex_; } @@ -744,7 +744,7 @@ ForkingDeathTest(const char* statement, const RE* regex); // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); + int Wait() override; protected: void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } @@ -780,7 +780,7 @@ public: NoExecDeathTest(const char* a_statement, const RE* a_regex) : ForkingDeathTest(a_statement, a_regex) { } - virtual TestRole AssumeRole(); + TestRole AssumeRole() override; }; // The AssumeRole process for a fork-and-run death test. It implements a @@ -835,7 +835,8 @@ ExecDeathTest(const char* a_statement, const RE* a_regex, const char* file, int line) : ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { } - virtual TestRole AssumeRole(); + TestRole AssumeRole() override; + private: // The name of the file in which the death test is located. const char* const file_; Index: utils/unittest/googletest/src/gtest-internal-inl.h =================================================================== --- utils/unittest/googletest/src/gtest-internal-inl.h +++ utils/unittest/googletest/src/gtest-internal-inl.h @@ -431,8 +431,8 @@ class OsStackTraceGetter : public OsStackTraceGetterInterface { public: OsStackTraceGetter() : caller_frame_(NULL) {} - virtual String CurrentStackTrace(int max_depth, int skip_count); - virtual void UponLeavingGTest(); + String CurrentStackTrace(int max_depth, int skip_count) override; + void UponLeavingGTest() override; // This string is inserted in place of stack frames that are part of // Google Test's implementation. @@ -465,7 +465,7 @@ explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); // Implements the TestPartResultReporterInterface. Reports the test part // result in the current test. - virtual void ReportTestPartResult(const TestPartResult& result); + void ReportTestPartResult(const TestPartResult &result) override; private: UnitTestImpl* const unit_test_; @@ -481,7 +481,7 @@ explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); // Implements the TestPartResultReporterInterface. The implementation just // delegates to the current global test part result reporter of *unit_test_. - virtual void ReportTestPartResult(const TestPartResult& result); + void ReportTestPartResult(const TestPartResult &result) override; private: UnitTestImpl* const unit_test_; Index: utils/unittest/googletest/src/gtest.cc =================================================================== --- utils/unittest/googletest/src/gtest.cc +++ utils/unittest/googletest/src/gtest.cc @@ -2663,19 +2663,19 @@ } // The following methods override what's in the TestEventListener class. - virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); - virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestCaseStart(const TestCase& test_case); - virtual void OnTestStart(const TestInfo& test_info); - virtual void OnTestPartResult(const TestPartResult& result); - virtual void OnTestEnd(const TestInfo& test_info); - virtual void OnTestCaseEnd(const TestCase& test_case); - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); - virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); - virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} + void OnTestProgramStart(const UnitTest & /*unit_test*/) override {} + void OnTestIterationStart(const UnitTest &unit_test, int iteration) override; + void OnEnvironmentsSetUpStart(const UnitTest &unit_test) override; + void OnEnvironmentsSetUpEnd(const UnitTest & /*unit_test*/) override {} + void OnTestCaseStart(const TestCase &test_case) override; + void OnTestStart(const TestInfo &test_info) override; + void OnTestPartResult(const TestPartResult &result) override; + void OnTestEnd(const TestInfo &test_info) override; + void OnTestCaseEnd(const TestCase &test_case) override; + void OnEnvironmentsTearDownStart(const UnitTest &unit_test) override; + void OnEnvironmentsTearDownEnd(const UnitTest & /*unit_test*/) override {} + void OnTestIterationEnd(const UnitTest &unit_test, int iteration) override; + void OnTestProgramEnd(const UnitTest & /*unit_test*/) override {} private: static void PrintFailedTests(const UnitTest& unit_test); @@ -2869,7 +2869,7 @@ class TestEventRepeater : public TestEventListener { public: TestEventRepeater() : forwarding_enabled_(true) {} - virtual ~TestEventRepeater(); + ~TestEventRepeater() override; void Append(TestEventListener *listener); TestEventListener* Release(TestEventListener* listener); @@ -2878,19 +2878,19 @@ bool forwarding_enabled() const { return forwarding_enabled_; } void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; } - virtual void OnTestProgramStart(const UnitTest& unit_test); - virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); - virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); - virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test); - virtual void OnTestCaseStart(const TestCase& test_case); - virtual void OnTestStart(const TestInfo& test_info); - virtual void OnTestPartResult(const TestPartResult& result); - virtual void OnTestEnd(const TestInfo& test_info); - virtual void OnTestCaseEnd(const TestCase& test_case); - virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); - virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test); - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); - virtual void OnTestProgramEnd(const UnitTest& unit_test); + void OnTestProgramStart(const UnitTest &unit_test) override; + void OnTestIterationStart(const UnitTest &unit_test, int iteration) override; + void OnEnvironmentsSetUpStart(const UnitTest &unit_test) override; + void OnEnvironmentsSetUpEnd(const UnitTest &unit_test) override; + void OnTestCaseStart(const TestCase &test_case) override; + void OnTestStart(const TestInfo &test_info) override; + void OnTestPartResult(const TestPartResult &result) override; + void OnTestEnd(const TestInfo &test_info) override; + void OnTestCaseEnd(const TestCase &test_case) override; + void OnEnvironmentsTearDownStart(const UnitTest &unit_test) override; + void OnEnvironmentsTearDownEnd(const UnitTest &unit_test) override; + void OnTestIterationEnd(const UnitTest &unit_test, int iteration) override; + void OnTestProgramEnd(const UnitTest &unit_test) override; private: // Controls whether events will be forwarded to listeners_. Set to false @@ -2983,7 +2983,7 @@ public: explicit XmlUnitTestResultPrinter(const char* output_file); - virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); + void OnTestIterationEnd(const UnitTest &unit_test, int iteration) override; private: // Is c a whitespace character that is normalized to a space character @@ -3310,16 +3310,16 @@ Send("gtest_streaming_protocol_version=1.0\n"); } - virtual ~StreamingListener() { + ~StreamingListener() override { if (sockfd_ != -1) CloseConnection(); } - void OnTestProgramStart(const UnitTest& /* unit_test */) { + void OnTestProgramStart(const UnitTest & /* unit_test */) override { Send("event=TestProgramStart\n"); } - void OnTestProgramEnd(const UnitTest& unit_test) { + void OnTestProgramEnd(const UnitTest &unit_test) override { // Note that Google Test current only report elapsed time for each // test iteration, not for the entire test program. Send(String::Format("event=TestProgramEnd&passed=%d\n", @@ -3329,39 +3329,41 @@ CloseConnection(); } - void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) { + void OnTestIterationStart(const UnitTest & /* unit_test */, + int iteration) override { Send(String::Format("event=TestIterationStart&iteration=%d\n", iteration)); } - void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) { + void OnTestIterationEnd(const UnitTest &unit_test, + int /* iteration */) override { Send(String::Format("event=TestIterationEnd&passed=%d&elapsed_time=%sms\n", unit_test.Passed(), StreamableToString(unit_test.elapsed_time()).c_str())); } - void OnTestCaseStart(const TestCase& test_case) { + void OnTestCaseStart(const TestCase &test_case) override { Send(String::Format("event=TestCaseStart&name=%s\n", test_case.name())); } - void OnTestCaseEnd(const TestCase& test_case) { + void OnTestCaseEnd(const TestCase &test_case) override { Send(String::Format("event=TestCaseEnd&passed=%d&elapsed_time=%sms\n", test_case.Passed(), StreamableToString(test_case.elapsed_time()).c_str())); } - void OnTestStart(const TestInfo& test_info) { + void OnTestStart(const TestInfo &test_info) override { Send(String::Format("event=TestStart&name=%s\n", test_info.name())); } - void OnTestEnd(const TestInfo& test_info) { + void OnTestEnd(const TestInfo &test_info) override { Send(String::Format( "event=TestEnd&passed=%d&elapsed_time=%sms\n", (test_info.result())->Passed(), StreamableToString((test_info.result())->elapsed_time()).c_str())); } - void OnTestPartResult(const TestPartResult& test_part_result) { + void OnTestPartResult(const TestPartResult &test_part_result) override { const char* file_name = test_part_result.file_name(); if (file_name == NULL) file_name = "";