Use 'override/final' instead of 'virtual' for overridden methods
authorAlexander Kornienko <alexfh@google.com>
Sat, 11 Apr 2015 02:11:45 +0000 (02:11 +0000)
committerAlexander Kornienko <alexfh@google.com>
Sat, 11 Apr 2015 02:11:45 +0000 (02:11 +0000)
The patch is generated using clang-tidy misc-use-override check.

This command was used:

  tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
    -checks='-*,misc-use-override' -header-filter='llvm|clang' \
    -j=32 -fix -format

http://reviews.llvm.org/D8925

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234679 91177308-0d34-0410-b5e6-96231b3b80d8

165 files changed:
examples/ExceptionDemo/ExceptionDemo.cpp
examples/Kaleidoscope/Chapter3/toy.cpp
examples/Kaleidoscope/Chapter4/toy.cpp
examples/Kaleidoscope/Chapter5/toy.cpp
examples/Kaleidoscope/Chapter6/toy.cpp
examples/Kaleidoscope/Chapter7/toy.cpp
examples/Kaleidoscope/Chapter8/toy.cpp
include/llvm/Analysis/AssumptionCache.h
include/llvm/Analysis/BlockFrequencyInfo.h
include/llvm/Analysis/CallGraph.h
include/llvm/Analysis/DependenceAnalysis.h
include/llvm/Analysis/InlineCost.h
include/llvm/Analysis/JumpInstrTableInfo.h
include/llvm/Analysis/LazyValueInfo.h
include/llvm/Analysis/LibCallAliasAnalysis.h
include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/Analysis/PostDominators.h
include/llvm/Analysis/RegionInfo.h
include/llvm/CodeGen/AsmPrinter.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/LiveRangeEdit.h
include/llvm/CodeGen/MachineBlockFrequencyInfo.h
include/llvm/CodeGen/MachineDominators.h
include/llvm/CodeGen/MachineFunctionAnalysis.h
include/llvm/CodeGen/MachineModuleInfo.h
include/llvm/CodeGen/MachinePassRegistry.h
include/llvm/CodeGen/MachinePostDominators.h
include/llvm/CodeGen/MachineRegionInfo.h
include/llvm/CodeGen/MachineScheduler.h
include/llvm/CodeGen/Passes.h
include/llvm/CodeGen/ScheduleDAGInstrs.h
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h
include/llvm/ExecutionEngine/RTDyldMemoryManager.h
include/llvm/ExecutionEngine/SectionMemoryManager.h
include/llvm/IR/BasicBlock.h
include/llvm/IR/Constants.h
include/llvm/IR/Function.h
include/llvm/IR/GlobalValue.h
include/llvm/IR/GlobalVariable.h
include/llvm/IR/InlineAsm.h
include/llvm/IR/InstrTypes.h
include/llvm/IR/Instruction.h
include/llvm/IR/Instructions.h
include/llvm/IR/LegacyPassManager.h
include/llvm/IR/LegacyPassNameParser.h
include/llvm/IR/Metadata.h
include/llvm/IR/Operator.h
include/llvm/IR/User.h
include/llvm/LineEditor/LineEditor.h
include/llvm/MC/MCAsmInfoELF.h
include/llvm/MC/MCAssembler.h
include/llvm/MC/MCELFStreamer.h
include/llvm/MC/MCLinkerOptimizationHint.h
include/llvm/MC/MCObjectStreamer.h
include/llvm/MC/MCParser/AsmLexer.h
include/llvm/MC/MCSectionCOFF.h
include/llvm/MC/MCSectionELF.h
include/llvm/MC/MCStreamer.h
include/llvm/MC/MCTargetAsmParser.h
include/llvm/Object/IRObjectFile.h
include/llvm/Object/SymbolicFile.h
include/llvm/Option/ArgList.h
include/llvm/Pass.h
include/llvm/Support/FormattedStream.h
include/llvm/Support/YAMLTraits.h
include/llvm/Support/circular_raw_ostream.h
include/llvm/Support/raw_os_ostream.h
include/llvm/Support/raw_ostream.h
lib/Analysis/AliasAnalysisCounter.cpp
lib/Analysis/CFLAliasAnalysis.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/CodeGen/AggressiveAntiDepBreaker.h
lib/CodeGen/AsmPrinter/DwarfException.h
lib/CodeGen/AsmPrinter/EHStreamer.h
lib/CodeGen/AsmPrinter/Win64Exception.h
lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/CriticalAntiDepBreaker.h
lib/CodeGen/InlineSpiller.cpp
lib/CodeGen/LiveDebugVariables.h
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h
lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/SpillPlacement.h
lib/CodeGen/WinEHPrepare.cpp
lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
lib/DebugInfo/PDB/PDBSymbolFunc.cpp
lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
lib/ExecutionEngine/ExecutionEngineBindings.cpp
lib/ExecutionEngine/GDBRegistrationListener.cpp
lib/ExecutionEngine/Interpreter/Interpreter.h
lib/ExecutionEngine/MCJIT/MCJIT.h
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
lib/IR/LegacyPassManager.cpp
lib/MC/ELFObjectWriter.cpp
lib/MC/MCParser/AsmParser.cpp
lib/Support/CommandLine.cpp
lib/Support/DataStream.cpp
lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
lib/Target/ARM/ARMConstantPoolValue.h
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h
lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
lib/Target/Mips/MipsOptionRecord.h
lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
lib/Target/PowerPC/PPCTargetStreamer.h
lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
lib/Target/Sparc/SparcSelectionDAGInfo.h
lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
lib/Target/XCore/XCoreTargetStreamer.h
lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
tools/bugpoint/ToolRunner.h
tools/lli/RemoteMemoryManager.h
tools/lli/RemoteTargetExternal.h
tools/lli/lli.cpp
unittests/ADT/DAGDeltaAlgorithmTest.cpp
unittests/ADT/DeltaAlgorithmTest.cpp
unittests/ADT/SmallVectorTest.cpp
unittests/Analysis/CFGTest.cpp
unittests/Analysis/ScalarEvolutionTest.cpp
unittests/ExecutionEngine/ExecutionEngineTest.cpp
unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp
unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
unittests/IR/DominatorTreeTest.cpp
unittests/IR/IRBuilderTest.cpp
unittests/IR/ValueHandleTest.cpp
unittests/LineEditor/LineEditor.cpp
unittests/Linker/LinkModulesTest.cpp
unittests/Support/AlignOfTest.cpp
unittests/Support/CommandLineTest.cpp
unittests/Support/MemoryBufferTest.cpp
unittests/Support/Path.cpp
unittests/Transforms/Utils/Cloning.cpp
utils/TableGen/DAGISelMatcher.h
utils/unittest/googletest/include/gtest/gtest-spi.h
utils/unittest/googletest/include/gtest/gtest-test-part.h
utils/unittest/googletest/include/gtest/gtest.h
utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
utils/unittest/googletest/include/gtest/internal/gtest-internal.h
utils/unittest/googletest/include/gtest/internal/gtest-param-util.h
utils/unittest/googletest/include/gtest/internal/gtest-port.h
utils/unittest/googletest/src/gtest-death-test.cc
utils/unittest/googletest/src/gtest-internal-inl.h
utils/unittest/googletest/src/gtest.cc

index d68c05f1222979ca5e4f9619021b2d37dc07a912..fed42b7c2bc10d19c0da6a3b465e6f84173ef97a 100644 (file)
@@ -1573,7 +1573,7 @@ public:
                                  std::runtime_error::operator=(toCopy)));
   }
 
-  virtual ~OurCppRunException (void) throw () {}
+  ~OurCppRunException(void) throw() override {}
 };
 } // end anonymous namespace
 
index 04a1e1ad70f22ef66304c0448240455e6e4a6bea..c60f76725fdb3909304a1da6f678e29683528f5f 100644 (file)
@@ -93,7 +93,7 @@ class NumberExprAST : public ExprAST {
   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 @@ class VariableExprAST : public ExprAST {
   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 @@ class BinaryExprAST : public ExprAST {
 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 @@ class CallExprAST : public ExprAST {
 public:
   CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)
     : Callee(callee), Args(args) {}
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// PrototypeAST - This class represents the "prototype" for a function,
index 329c3bed3ebc3b110da5de7b3384e8b417f2b8bc..ad091e4496b73775aa6412ef961b122e448cfd72 100644 (file)
@@ -107,7 +107,7 @@ class NumberExprAST : public ExprAST {
 
 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 @@ class VariableExprAST : public ExprAST {
 
 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 @@ class BinaryExprAST : public ExprAST {
 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 @@ class CallExprAST : public ExprAST {
 public:
   CallExprAST(const std::string &callee, std::vector<ExprAST *> &args)
       : Callee(callee), Args(args) {}
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// PrototypeAST - This class represents the "prototype" for a function,
@@ -452,13 +452,13 @@ class HelpingMemoryManager : public SectionMemoryManager {
 
 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 8ebc2bc12b22b3e11fe6810d534b084978b16c52..db9904895739ef68129568c408f87e01115c7663 100644 (file)
@@ -125,7 +125,7 @@ class NumberExprAST : public ExprAST {
 
 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 @@ class VariableExprAST : public ExprAST {
 
 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 @@ class BinaryExprAST : public ExprAST {
 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 @@ class CallExprAST : public ExprAST {
 public:
   CallExprAST(const std::string &callee, std::vector<ExprAST *> &args)
       : Callee(callee), Args(args) {}
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// IfExprAST - Expression class for if/then/else.
@@ -166,7 +166,7 @@ class IfExprAST : public ExprAST {
 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 @@ public:
   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 eb7e8e1f98254f60f76cc9ca7b28c8649dcd6940..e978a3ea3682191b69a4934aac969793b9d4140b 100644 (file)
@@ -133,7 +133,7 @@ class NumberExprAST : public ExprAST {
 
 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 @@ class VariableExprAST : public ExprAST {
 
 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 @@ class UnaryExprAST : public ExprAST {
 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 @@ class BinaryExprAST : public ExprAST {
 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 @@ class CallExprAST : public ExprAST {
 public:
   CallExprAST(const std::string &callee, std::vector<ExprAST *> &args)
       : Callee(callee), Args(args) {}
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// IfExprAST - Expression class for if/then/else.
@@ -185,7 +185,7 @@ class IfExprAST : public ExprAST {
 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 @@ public:
   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 ce5e1ddceb1b83f136e46d069824ce43c7a6e5fb..53ea51c2b9c5383b337c35b9c661d876329d533b 100644 (file)
@@ -138,7 +138,7 @@ class NumberExprAST : public ExprAST {
 
 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 @@ class VariableExprAST : public ExprAST {
 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 @@ class UnaryExprAST : public ExprAST {
 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 @@ class BinaryExprAST : public ExprAST {
 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 @@ class CallExprAST : public ExprAST {
 public:
   CallExprAST(const std::string &callee, std::vector<ExprAST *> &args)
       : Callee(callee), Args(args) {}
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// IfExprAST - Expression class for if/then/else.
@@ -191,7 +191,7 @@ class IfExprAST : public ExprAST {
 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 @@ public:
   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 @@ public:
              ExprAST *body)
       : VarNames(varnames), Body(body) {}
 
-  virtual Value *Codegen();
+  Value *Codegen() override;
 };
 
 /// PrototypeAST - This class represents the "prototype" for a function,
index 39b6a6541504a1fbf56dc1095e4e88997297596f..2838d6df5937a836ceae034ead157ec3e07f3b14 100644 (file)
@@ -221,10 +221,10 @@ class NumberExprAST : public ExprAST {
 
 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 @@ public:
   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 @@ class UnaryExprAST : public ExprAST {
 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 @@ class BinaryExprAST : public ExprAST {
 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 @@ public:
   CallExprAST(SourceLocation Loc, const std::string &callee,
               std::vector<ExprAST *> &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 @@ class IfExprAST : public ExprAST {
 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 @@ public:
   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 @@ public:
     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 @@ public:
              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 fc1393fc47a2b1efdc1a063591d27c5203a13460..1f00b691b305267fb4e2e2e486db48d1a1a6a161 100644 (file)
@@ -165,7 +165,7 @@ public:
   AssumptionCache &getAssumptionCache(Function &F);
 
   AssumptionCacheTracker();
-  ~AssumptionCacheTracker();
+  ~AssumptionCacheTracker() override;
 
   void releaseMemory() override { AssumptionCaches.shrink_and_clear(); }
 
index 3289a2823c0c13c35e33200460b3d76e791bcb46..f27c32df92836a285b550f0b2d813624d0b5d4b9 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   BlockFrequencyInfo();
 
-  ~BlockFrequencyInfo();
+  ~BlockFrequencyInfo() override;
 
   void getAnalysisUsage(AnalysisUsage &AU) const override;
 
index 64d288a2bb5d13ce93eec5db838f20f2c7fef1f3..14b88220202adeb9b87f46cf02648d5865afedaa 100644 (file)
@@ -318,7 +318,7 @@ public:
   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 ce0b8994d16d0619be0dccae795c3c6d70627307..0b3b2ea4281361605f8ceb755f1259e974036f11 100644 (file)
@@ -219,7 +219,7 @@ namespace llvm {
   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 fdee9f869c047670bc225b01b51ab1b0d957643d..79ed74d8241110976b6289d97676aff6dd5137a4 100644 (file)
@@ -107,7 +107,7 @@ public:
   static char ID;
 
   InlineCostAnalysis();
-  ~InlineCostAnalysis();
+  ~InlineCostAnalysis() override;
 
   // Pass interface implementation.
   void getAnalysisUsage(AnalysisUsage &AU) const override;
index 591e794a3901f9180f727db6cdb77e93499aad55..b6dad478cdf2903c2bcecb78c4aff5ef3f47a200 100644 (file)
@@ -39,7 +39,7 @@ public:
   /// 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 8e5bbfbdadb502b7bedd25e6c5009aef1ccd81ca..1051cff5efb701dedfa871abfdc30bae3ef5d253 100644 (file)
@@ -39,7 +39,7 @@ public:
   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 49e0dc86564b246ec844ed06876354f54c0c1d7c..df95e0e6fdc2769bcc7efeda24934564175273fb 100644 (file)
@@ -36,8 +36,8 @@ namespace llvm {
         : FunctionPass(ID), LCI(LC) {
       initializeLibCallAliasAnalysisPass(*PassRegistry::getPassRegistry());
     }
-    ~LibCallAliasAnalysis();
-    
+    ~LibCallAliasAnalysis() override;
+
     ModRefResult getModRefInfo(ImmutableCallSite CS,
                                const Location &Loc) override;
  
index abc2b90ad0ba5ddff332bbdf1e1b158ba8455f12..c8453e9ea34ba0b75dd2569a63daf73984e54cf6 100644 (file)
@@ -329,7 +329,7 @@ namespace llvm {
 
   public:
     MemoryDependenceAnalysis();
-    ~MemoryDependenceAnalysis();
+    ~MemoryDependenceAnalysis() override;
     static char ID;
 
     /// Pass Implementation stuff.  This doesn't do any analysis eagerly.
index 72cd35754c8a5739fb98c21db34ab5d35a17a516..0f7e2b88d2d70a68bd0d7dabc79f284ef0a7590b 100644 (file)
@@ -30,7 +30,7 @@ struct PostDominatorTree : public FunctionPass {
     DT = new DominatorTreeBase<BasicBlock>(true);
   }
 
-  ~PostDominatorTree();
+  ~PostDominatorTree() override;
 
   bool runOnFunction(Function &F) override;
 
index 1c7f4d30630f7634e15a037865e7e889b40cb39b..dee0671c8bd75b1012e4863539db7149d9a22513 100644 (file)
@@ -842,7 +842,7 @@ class RegionInfo : public RegionInfoBase<RegionTraits<Function>> {
 public:
   explicit RegionInfo();
 
-  virtual ~RegionInfo();
+  ~RegionInfo() override;
 
   // updateStatistics - Update statistic about created regions.
   void updateStatistics(Region *R) final;
@@ -858,7 +858,7 @@ public:
   static char ID;
   explicit RegionInfoPass();
 
-  ~RegionInfoPass();
+  ~RegionInfoPass() override;
 
   RegionInfo &getRegionInfo() { return RI; }
 
index d364012acf930ca371e6a153d7a8002d8f13542d..11f98ca6b94fe539c62b8906e022fd6769e09498 100644 (file)
@@ -140,7 +140,7 @@ protected:
   explicit AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer);
 
 public:
-  virtual ~AsmPrinter();
+  ~AsmPrinter() override;
 
   DwarfDebug *getDwarfDebug() { return DD; }
   DwarfDebug *getDwarfDebug() const { return DD; }
index dc52c0a896c40a0ae4d049930f65c0be667fb8d5..9673f80e0856678b2f14d9ab4bdcf8ed351614d9 100644 (file)
@@ -100,7 +100,7 @@ extern cl::opt<bool> UseSegmentSetForPhysRegs;
   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 44c3c4eaf7b174569ade68cdf5774c197d78451e..de855f2fe7a0f664a00b072e98a87a66b8bdf369 100644 (file)
@@ -122,7 +122,7 @@ public:
     MRI.setDelegate(this);
   }
 
-  ~LiveRangeEdit() { MRI.resetDelegate(this); }
+  ~LiveRangeEdit() override { MRI.resetDelegate(this); }
 
   LiveInterval &getParent() const {
    assert(Parent && "No parent LiveInterval");
index 1aef689eb7a44b7712644e41c2d383c410bebe16..feb394e7a69e0026dd7fa40c611503883acf0b84 100644 (file)
@@ -35,7 +35,7 @@ public:
 
   MachineBlockFrequencyInfo();
 
-  ~MachineBlockFrequencyInfo();
+  ~MachineBlockFrequencyInfo() override;
 
   void getAnalysisUsage(AnalysisUsage &AU) const override;
 
index 19f4e2d96551c1afdc095ca23798a62e7ef58bbc..4428fa618fb01e6f08e79d0af1a69edfbefa1384 100644 (file)
@@ -72,7 +72,7 @@ public:
 
   MachineDominatorTree();
 
-  ~MachineDominatorTree();
+  ~MachineDominatorTree() override;
 
   DominatorTreeBase<MachineBasicBlock> &getBase() {
     applySplitCriticalEdges();
index 36f1c6627096c093367fa6e640c9694633d6dff3..023eeb1b4d0ea49cbdc6ca37e3da6e09f9e40b97 100644 (file)
@@ -31,7 +31,7 @@ private:
 public:
   static char ID;
   explicit MachineFunctionAnalysis(const TargetMachine &tm);
-  ~MachineFunctionAnalysis();
+  ~MachineFunctionAnalysis() override;
 
   MachineFunction &getMF() const { return *MF; }
 
index 2053e575d281ab3eeafb1c7a1e6ebac14e922bbb..f80c998a9f78742394e779c0d44e85b816363eff 100644 (file)
@@ -199,7 +199,7 @@ public:
   // Real constructor.
   MachineModuleInfo(const MCAsmInfo &MAI, const MCRegisterInfo &MRI,
                     const MCObjectFileInfo *MOFI);
-  ~MachineModuleInfo();
+  ~MachineModuleInfo() override;
 
   // Initialization and Finalization
   bool doInitialization(Module &) override;
index 57d1a6d9b1927b883cf1bc0bb27fa1de72d18468..6731983c58746b7626a68c3fe26cbead600a8c9d 100644 (file)
@@ -124,7 +124,7 @@ class RegisterPassParser : public MachinePassRegistryListener,
 public:
   RegisterPassParser(cl::Option &O)
       : cl::parser<typename RegistryClass::FunctionPassCtor>(O) {}
-  ~RegisterPassParser() { RegistryClass::setListener(nullptr); }
+  ~RegisterPassParser() override { RegistryClass::setListener(nullptr); }
 
   void initialize() {
     cl::parser<typename RegistryClass::FunctionPassCtor>::initialize();
index aab5c407629f7405b389753763158b1e716ef2ad..70bdb191ad3439ce15f2982ea48e53a19316928e 100644 (file)
@@ -33,7 +33,7 @@ public:
 
   MachinePostDominatorTree();
 
-  ~MachinePostDominatorTree();
+  ~MachinePostDominatorTree() override;
 
   FunctionPass *createMachinePostDominatorTreePass();
 
index 43499dba71c02b3c47ce7b5b131c3d7351839dbc..b0ac22a04043a173c50740cdaa8f0d41f17dbcba 100644 (file)
@@ -80,7 +80,7 @@ class MachineRegionInfo : public RegionInfoBase<RegionTraits<MachineFunction>> {
 public:
   explicit MachineRegionInfo();
 
-  virtual ~MachineRegionInfo();
+  ~MachineRegionInfo() override;
 
   // updateStatistics - Update statistic about created regions.
   void updateStatistics(MachineRegion *R) final;
@@ -98,7 +98,7 @@ public:
   static char ID;
   explicit MachineRegionInfoPass();
 
-  ~MachineRegionInfoPass();
+  ~MachineRegionInfoPass() override;
 
   MachineRegionInfo &getRegionInfo() {
     return RI;
index a31940161ca52bb3b52401d3565c1435a1d65d0d..e80e14e5ccf75541f5d22a2bc229a157687554a6 100644 (file)
@@ -385,7 +385,7 @@ public:
         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 @@ public:
   PostGenericScheduler(const MachineSchedContext *C):
     GenericSchedulerBase(C), Top(SchedBoundary::TopQID, "TopQ") {}
 
-  virtual ~PostGenericScheduler() {}
+  ~PostGenericScheduler() override {}
 
   void initPolicy(MachineBasicBlock::iterator Begin,
                   MachineBasicBlock::iterator End,
index 48e1f210404cd957dac15448086f6ffeb23001eb..2505c04a720a88f6d5fcabecda8e039ad9baaa87 100644 (file)
@@ -125,7 +125,7 @@ public:
   // Dummy constructor.
   TargetPassConfig();
 
-  virtual ~TargetPassConfig();
+  ~TargetPassConfig() override;
 
   static char ID;
 
index 00dd8f9a633e2c23df17f003fabcfafc2bedd114..1196783e820b8491e431f9fd793ae897a87a3531 100644 (file)
@@ -158,7 +158,7 @@ namespace llvm {
                                bool RemoveKillFlags = false,
                                LiveIntervals *LIS = nullptr);
 
-    virtual ~ScheduleDAGInstrs() {}
+    ~ScheduleDAGInstrs() override {}
 
     bool isPostRA() const { return IsPostRA; }
 
index 7acdfc7bdc892ae649231c9428c996c170c34f6d..a8743754f40eee9b21dde0786e0de086828b3344 100644 (file)
@@ -58,7 +58,7 @@ public:
 
   explicit SelectionDAGISel(TargetMachine &tm,
                             CodeGenOpt::Level OL = CodeGenOpt::Default);
-  virtual ~SelectionDAGISel();
+  ~SelectionDAGISel() override;
 
   const TargetLowering *getTargetLowering() const { return TLI; }
 
index 232678ef1f8c41c9aefda25a880e37cc8b02d33f..a868cbd020fdf2dbae725dbc6d8d5bc93a66b432 100644 (file)
@@ -39,7 +39,7 @@ class TargetLoweringObjectFileELF : public TargetLoweringObjectFile {
 public:
   TargetLoweringObjectFileELF() : UseInitArray(false) {}
 
-  virtual ~TargetLoweringObjectFileELF() {}
+  ~TargetLoweringObjectFileELF() override {}
 
   void emitPersonalityValue(MCStreamer &Streamer, const TargetMachine &TM,
                             const MCSymbol *Sym) const override;
@@ -88,7 +88,7 @@ public:
 
 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 @@ public:
 
 class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile {
 public:
-  virtual ~TargetLoweringObjectFileCOFF() {}
+  ~TargetLoweringObjectFileCOFF() override {}
 
   const MCSection *
     getExplicitSectionGlobal(const GlobalValue *GV,
index 96ce12f233be47109f7ea5cb59ad7cd2bd1832d6..b5fa8c33414dbd2d0a9ad2bc3fe00ad737bef8c0 100644 (file)
@@ -22,7 +22,7 @@ public:
   ConcreteSymbolEnumerator(std::unique_ptr<IPDBEnumSymbols> SymbolEnumerator)
       : Enumerator(std::move(SymbolEnumerator)) {}
 
-  virtual ~ConcreteSymbolEnumerator() {}
+  ~ConcreteSymbolEnumerator() override {}
 
   uint32_t getChildCount() const override {
     return Enumerator->getChildCount();
index 098009a9f928a9624fab661c4772b642f3262fb5..207bad06c23965cf8e421e918ecc370ff77c0509 100644 (file)
@@ -56,7 +56,7 @@ class RTDyldMemoryManager : public MCJITMemoryManager,
   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 b30934f8103cd82f22ea4f7bcc6c21e8dd34cde2..0b0dcb021f148729f4ab953d01e200ab8c4f8e67 100644 (file)
@@ -40,7 +40,7 @@ class SectionMemoryManager : public RTDyldMemoryManager {
 
 public:
   SectionMemoryManager() { }
-  virtual ~SectionMemoryManager();
+  ~SectionMemoryManager() override;
 
   /// \brief Allocates a memory block of (at least) the given size suitable for
   /// executable code.
index 3d6c69b5ac607020d32fb4d2a793aa1368588c41..a71946eda6eded40ae16f009d64101aa3f7be41c 100644 (file)
@@ -105,7 +105,7 @@ public:
                             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 21189752eb37e4ae010524a35a9094f7c09579b6..70437e66cbf29dbfb53b187770737c777d0c3b2d 100644 (file)
@@ -547,7 +547,7 @@ class ConstantDataSequential : public Constant {
 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 80613f34c58e379e12dc7e9c220e37389c08287b..acbabdda79f15b187d897d828b38d9386c28ac12 100644 (file)
@@ -114,7 +114,7 @@ public:
     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 79dbd52ed7703be329140c5fa8204bedb2def859..aeaaef4bd8b967626decb0f9986e98c427f4ae77 100644 (file)
@@ -104,7 +104,7 @@ public:
     LocalExecTLSModel
   };
 
-  ~GlobalValue() {
+  ~GlobalValue() override {
     removeDeadConstantUsers();   // remove any dead constants using this.
   }
 
index d7b81a2baf24a927466e4994e373fd63ddb13aa3..9f57705dae72e5dba7c145ab189823a2bc5802f3 100644 (file)
@@ -66,7 +66,7 @@ public:
                  ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0,
                  bool isExternallyInitialized = false);
 
-  ~GlobalVariable() {
+  ~GlobalVariable() override {
     NumOperands = 1; // FIXME: needed by operator delete
   }
 
index 6ae4122d936e71a3e9f7da86b3463247a9e6d7fa..c8f25e7ba8443adde091045203a7b9dcb6529480 100644 (file)
@@ -51,7 +51,7 @@ private:
   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 3a33f43f0248347d42f06ada1a888165b9b4bed9..108b9eb36b7e160b55850060c71283f5ebfce32e 100644 (file)
@@ -44,7 +44,7 @@ protected:
     : 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 @@ public:
   }
 
   // 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 fa7410e8323ce3aa0fdf493297de69705e3ceaab..9dd16fd5a60918226c3433f128d5656a26adf137 100644 (file)
@@ -62,7 +62,7 @@ class Instruction : public User, public ilist_node<Instruction> {
   };
 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 99c5b67e9db6db12e71f3a3ba37cfe8ab79a0bd1..2c8bc19518da00ee79ecb24ddf91d1f868d83d0a 100644 (file)
@@ -91,7 +91,7 @@ public:
              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 @@ public:
   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 @@ public:
                          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 @@ public:
   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 @@ public:
   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 @@ public:
     return new SwitchInst(Value, Default, NumCases, InsertAtEnd);
   }
 
-  ~SwitchInst();
+  ~SwitchInst() override;
 
   /// Provide fast operand accessors
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
@@ -2951,7 +2951,7 @@ public:
                                 BasicBlock *InsertAtEnd) {
     return new IndirectBrInst(Address, NumDests, InsertAtEnd);
   }
-  ~IndirectBrInst();
+  ~IndirectBrInst() override;
 
   /// Provide fast operand accessors.
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
index 6c04e9dc3d3fb44f1c566c6eca651d865a261983..5257a0eed488cd9b1574a146e8e5d91a9f3bb8f6 100644 (file)
@@ -50,7 +50,7 @@ class PassManager : public PassManagerBase {
 public:
 
   PassManager();
-  ~PassManager();
+  ~PassManager() override;
 
   void add(Pass *P) override;
 
@@ -70,7 +70,7 @@ public:
   /// 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 52db1c3bff55dada37b5d759682f35901c7f7ab3..39ae80d797c707302225ee852eef168532aeefbc 100644 (file)
@@ -43,7 +43,7 @@ class PassNameParser : public PassRegistrationListener,
                        public cl::parser<const PassInfo*> {
 public:
   PassNameParser(cl::Option &O);
-  virtual ~PassNameParser();
+  ~PassNameParser() override;
 
   void initialize() {
     cl::parser<const PassInfo*>::initialize();
index 0e22e6bc6f151289caaead6b3cbfe919cc43a20f..9dcf937aa5ac79b0471317bb166441e1bebd6597 100644 (file)
@@ -164,7 +164,7 @@ class MetadataAsValue : public Value {
   Metadata *MD;
 
   MetadataAsValue(Type *Ty, Metadata *MD);
-  ~MetadataAsValue();
+  ~MetadataAsValue() override;
 
   /// \brief Drop use of metadata (during teardown).
   void dropUse() { MD = nullptr; }
index ae914a14a2cf45038820546dafb5546468a8a797..8c3afdd86aed362671a6c65760d9c6ecb73cc52d 100644 (file)
@@ -42,7 +42,7 @@ protected:
   // 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 d39378dd57da89452e7e391dbcae66245ddcc9b5..455900566afde6a71b591ce2c855e685e95e11aa 100644 (file)
@@ -60,9 +60,7 @@ protected:
     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 1a9a691060323a2ed1b616d5370beaf1b078fa42..bb106f87ca48759ca9dac52a2e9a82a33b49c412 100644 (file)
@@ -119,7 +119,7 @@ private:
   };
 
   struct ListCompleterConcept : CompleterConcept {
-    ~ListCompleterConcept();
+    ~ListCompleterConcept() override;
     CompletionAction complete(StringRef Buffer, size_t Pos) const override;
     static std::string getCommonPrefix(const std::vector<Completion> &Comps);
     virtual std::vector<Completion> getCompletions(StringRef Buffer,
index 7bd246056eca074248216f9b552c45aeb6fbe717..afd49336646b4d0910bc320350d008fb716fcbe8 100644 (file)
@@ -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 9a85293f47c467f5a80119dd846bcc67ed71ec3f..aec12b69aa7976c675625790c0e9b0b69c86083f 100644 (file)
@@ -143,7 +143,7 @@ public:
     : MCFragment(FType, SD), BundlePadding(0)
   {
   }
-  virtual ~MCEncodedFragment();
+  ~MCEncodedFragment() override;
 
   virtual SmallVectorImpl<char> &getContents() = 0;
   virtual const SmallVectorImpl<char> &getContents() const = 0;
@@ -182,7 +182,7 @@ public:
   {
   }
 
-  virtual ~MCEncodedFragmentWithFixups();
+  ~MCEncodedFragmentWithFixups() override;
 
   typedef SmallVectorImpl<MCFixup>::const_iterator const_fixup_iterator;
   typedef SmallVectorImpl<MCFixup>::iterator fixup_iterator;
index 8d91efd555df1846378296abb551c81c15fea87e..0c1aaace10942701e33a27a7b0c20f83940d3fea 100644 (file)
@@ -34,7 +34,7 @@ public:
       : MCObjectStreamer(Context, TAB, OS, Emitter),
         SeenIdent(false) {}
 
-  virtual ~MCELFStreamer();
+  ~MCELFStreamer() override;
 
   /// state management
   void reset() override {
index 890d6385aacde34ce3cd369018f283fe5e171554..c96d5782bc4bee35809f4c18327bf732b2a3ed07 100644 (file)
@@ -141,7 +141,7 @@ public:
 
     public:
       raw_counting_ostream() : Count(0) {}
-      ~raw_counting_ostream() { flush(); }
+      ~raw_counting_ostream() override { flush(); }
     };
 
     raw_counting_ostream OutStream;
index 3538f733dc72cdf9702a18b6b6f7e4dcd72bf530..a057e29c9f97a426ba9be94396c751ef1e7b19ec 100644 (file)
@@ -51,7 +51,7 @@ class MCObjectStreamer : public MCStreamer {
 protected:
   MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &OS,
                    MCCodeEmitter *Emitter);
-  ~MCObjectStreamer();
+  ~MCObjectStreamer() override;
 
 public:
   /// state management
index 2f681d6fce6ab24fcb8c23e264b89f2287b48a12..62d39b26c860055cbb3e99e436e7c4f0ba5407cc 100644 (file)
@@ -40,7 +40,7 @@ protected:
 
 public:
   AsmLexer(const MCAsmInfo &MAI);
-  ~AsmLexer();
+  ~AsmLexer() override;
 
   void setBuffer(StringRef Buf, const char *ptr = nullptr);
 
index b6ec1d852d4f6c3c47f71ff7915d208cbf9e3643..237f6d31fb1b054be1c95a76a70324368230c904 100644 (file)
@@ -53,7 +53,7 @@ class MCSymbol;
       assert ((Characteristics & 0x00F00000) == 0 &&
         "alignment must not be set upon section creation");
     }
-    ~MCSectionCOFF();
+    ~MCSectionCOFF() override;
 
   public:
     /// ShouldOmitSectionDirective - Decides whether a '.section' directive
index 86855e62316612e10a23587300e5074b71bfd96e..9efe1022f2957feff48a019dd14ab63f34290f1d 100644 (file)
@@ -59,7 +59,7 @@ private:
       : 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 91287d0fe704ff9d427e904633fac8d9b9665fa8..ad2bbcf33b52f201d0095ec6abb0520b497c391e 100644 (file)
@@ -90,7 +90,7 @@ public:
 class AArch64TargetStreamer : public MCTargetStreamer {
 public:
   AArch64TargetStreamer(MCStreamer &S);
-  ~AArch64TargetStreamer();
+  ~AArch64TargetStreamer() override;
 
   void finish() override;
 
@@ -115,7 +115,7 @@ private:
 class ARMTargetStreamer : public MCTargetStreamer {
 public:
   ARMTargetStreamer(MCStreamer &S);
-  ~ARMTargetStreamer();
+  ~ARMTargetStreamer() override;
 
   virtual void emitFnStart();
   virtual void emitFnEnd();
index 8412b1d88069eb2a5d6f507401369b6127cb3cd1..03f0f6bba73781fc023a132c2fdd55a037814705 100644 (file)
@@ -110,7 +110,7 @@ protected: // Can only create subclasses.
   MCTargetOptions MCOptions;
 
 public:
-  virtual ~MCTargetAsmParser();
+  ~MCTargetAsmParser() override;
 
   uint64_t getAvailableFeatures() const { return AvailableFeatures; }
   void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; }
index 74f46667ce64a3f3c451590931709b8d95084cda..ef655287c34c6aa9d7fb735538a3224e2d60e5bf 100644 (file)
@@ -31,7 +31,7 @@ class IRObjectFile : public SymbolicFile {
 
 public:
   IRObjectFile(MemoryBufferRef Object, std::unique_ptr<Module> M);
-  ~IRObjectFile();
+  ~IRObjectFile() override;
   void moveSymbolNext(DataRefImpl &Symb) const override;
   std::error_code printSymbolName(raw_ostream &OS,
                                   DataRefImpl Symb) const override;
index b6a8b4d81501b5b3b1bbf7a6827b25832176ce93..114b229b822c06497ef7e8c6f440f00d76e9cf03 100644 (file)
@@ -118,7 +118,7 @@ const uint64_t UnknownAddressOrSize = ~0ULL;
 
 class SymbolicFile : public Binary {
 public:
-  virtual ~SymbolicFile();
+  ~SymbolicFile() override;
   SymbolicFile(unsigned int Type, MemoryBufferRef Source);
 
   // virtual interface.
index 9a093092faed5b5bf07feee65ca29d7f1baf7e4a..23b04513178c05fe7361b2cf1018680469022e23 100644 (file)
@@ -320,7 +320,7 @@ private:
 
 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 @@ class DerivedArgList : public ArgList {
 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 6e92d967f9803ab691cdf504a33a7609bfb7ea4b..3c4d838a465268f42e82a989e84d29bee35140e5 100644 (file)
@@ -250,7 +250,7 @@ public:
 
   explicit ModulePass(char &pid) : Pass(PT_Module, pid) {}
   // Force out-of-line virtual method.
-  virtual ~ModulePass();
+  ~ModulePass() override;
 };
 
 
@@ -279,7 +279,7 @@ public:
   : ModulePass(pid) {}
 
   // Force out-of-line virtual method.
-  virtual ~ImmutablePass();
+  ~ImmutablePass() override;
 };
 
 //===----------------------------------------------------------------------===//
index ad1a26102819f39def0da045295b12e4c865a9fd..4a135cd23174f007c21cc0fc64c6e144f9f85ab9 100644 (file)
@@ -94,7 +94,7 @@ public:
     Scanned = nullptr;
   }
 
-  ~formatted_raw_ostream() {
+  ~formatted_raw_ostream() override {
     flush();
     releaseStream();
   }
index 78829f862123b43ab4eb8202ec009761eb11dcc9..672cf30994ac0a149ef9890238dd109a1e2384db 100644 (file)
@@ -888,7 +888,7 @@ public:
         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 @@ private:
   };
 
   class MapHNode : public HNode {
-    virtual void anchor();
+    void anchor() override;
 
   public:
     MapHNode(Node *n) : HNode(n) { }
@@ -974,7 +974,7 @@ private:
   };
 
   class SequenceHNode : public HNode {
-    virtual void anchor();
+    void anchor() override;
 
   public:
     SequenceHNode(Node *n) : HNode(n) { }
@@ -1020,7 +1020,7 @@ private:
 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 43829660acc960980b24885a7604a9ed08cd90d8..19f9c2c4b15573ef5bdf107fcff6bfedebe75ee5 100644 (file)
@@ -117,7 +117,7 @@ namespace llvm
       setStream(Stream, Owns);
     }
 
-    ~circular_raw_ostream() {
+    ~circular_raw_ostream() override {
       flush();
       flushBufferWithBanner();
       releaseStream();
index 04cf3b6202c439dadaaf82e07cc7c15eacb25006..a983aeb90879c5fe71eb85d5d094dcc585ed23a8 100644 (file)
@@ -34,7 +34,7 @@ class raw_os_ostream : public raw_ostream {
 
 public:
   raw_os_ostream(std::ostream &O) : OS(O) {}
-  ~raw_os_ostream();
+  ~raw_os_ostream() override;
 };
 
 } // end llvm namespace
index c378fa95763d924188ef3ef678b204e08a8b90ef..6aba60d5e8c812266d7e937135c846f624bb813b 100644 (file)
@@ -366,7 +366,7 @@ public:
   /// this closes the file when the stream is destroyed.
   raw_fd_ostream(int fd, bool shouldClose, bool unbuffered=false);
 
-  ~raw_fd_ostream();
+  ~raw_fd_ostream() override;
 
   /// Manually flush the stream and close the file. Note that this does not call
   /// fsync.
@@ -448,7 +448,7 @@ class raw_string_ostream : public raw_ostream {
   uint64_t current_pos() const override { return OS.size(); }
 public:
   explicit raw_string_ostream(std::string &O) : OS(O) {}
-  ~raw_string_ostream();
+  ~raw_string_ostream() override;
 
   /// Flushes the stream contents to the target string and returns  the string's
   /// reference.
@@ -475,7 +475,7 @@ public:
   /// \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<char> &O);
-  ~raw_svector_ostream();
+  ~raw_svector_ostream() override;
 
   /// This is called when the SmallVector we're appending to is changed outside
   /// of the raw_svector_ostream's control.  It is only safe to do this if the
@@ -498,7 +498,7 @@ class raw_null_ostream : public raw_ostream {
 
 public:
   explicit raw_null_ostream() {}
-  ~raw_null_ostream();
+  ~raw_null_ostream() override;
 };
 
 } // end llvm namespace
index 5865259ad9a45772d5f6b808b6bf8d0b8c94801e..a1bfba1f0026f213560e2d8b332149b8158fe98a 100644 (file)
@@ -44,7 +44,7 @@ namespace {
       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 53d748d5f6e3ae7d575322de886e3d24cedc66a4..3147992b9b801278cb19a4116fe325df44bd3972 100644 (file)
@@ -161,7 +161,7 @@ struct FunctionHandle : public CallbackVH {
     assert(CFLAA != nullptr);
   }
 
-  virtual ~FunctionHandle() {}
+  ~FunctionHandle() override {}
 
   void deleted() override { removeSelfFromCache(); }
   void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
@@ -189,7 +189,7 @@ public:
     initializeCFLAliasAnalysisPass(*PassRegistry::getPassRegistry());
   }
 
-  virtual ~CFLAliasAnalysis() {}
+  ~CFLAliasAnalysis() override {}
 
   void getAnalysisUsage(AnalysisUsage &AU) const override {
     AliasAnalysis::getAnalysisUsage(AU);
index 5771043e18968676afad807f8f213c31c2cfa46e..149642b1b3e315669875ab7d1d3d97e15c460ad6 100644 (file)
@@ -230,7 +230,7 @@ public:
                          DiagnosticHandlerFunction DiagnosticHandler);
   explicit BitcodeReader(DataStreamer *streamer, LLVMContext &C,
                          DiagnosticHandlerFunction DiagnosticHandler);
-  ~BitcodeReader() { FreeState(); }
+  ~BitcodeReader() override { FreeState(); }
 
   std::error_code materializeForwardReferencedFunctions();
 
index 12cf95b9b4f9bf30a0b3fe48374a8887425f6839..f9544dd1bee291f0bba6d5e458b75c71d13c0981 100644 (file)
@@ -127,7 +127,7 @@ class RegisterClassInfo;
     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 6eaf70746295cd853ed67f39162e51f2a3394a6a..a4fd36f0339a2ed3e2af9dbeee3d59f57e471c10 100644 (file)
@@ -48,7 +48,7 @@ public:
   // 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 @@ public:
   // Main entry points.
   //
   ARMException(AsmPrinter *A);
-  virtual ~ARMException();
+  ~ARMException() override;
 
   /// Emit all exception information that should come after the content.
   void endModule() override;
index aa42373b48899d762d64e82068cc51cf3c51b104..65973fab6b2185e06aeb10f1c463a2f1fc9dd61c 100644 (file)
@@ -125,7 +125,7 @@ protected:
 
 public:
   EHStreamer(AsmPrinter *A);
-  virtual ~EHStreamer();
+  ~EHStreamer() override;
 
   // Unused.
   void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
index eb02ca47b396aec3a9e8ab2bce64b1b43aa7200f..5f4237fc0152467e3b7a6076f5587a6f045aa656 100644 (file)
@@ -43,7 +43,7 @@ public:
   // Main entry points.
   //
   Win64Exception(AsmPrinter *A);
-  virtual ~Win64Exception();
+  ~Win64Exception() override;
 
   /// Emit all exception information that should come after the content.
   void endModule() override;
index 8492eacb7ff723f6453b80d66bfdd30230b18d59..c66d141837d0c7029ac2b0e603632455f5860045 100644 (file)
@@ -114,7 +114,7 @@ class WinCodeViewLineTables : public AsmPrinterHandler {
 public:
   WinCodeViewLineTables(AsmPrinter *Asm);
 
-  ~WinCodeViewLineTables() {
+  ~WinCodeViewLineTables() override {
     for (DirAndFilenameToFilepathMapTy::iterator
              I = DirAndFilenameToFilepathMap.begin(),
              E = DirAndFilenameToFilepathMap.end();
index 937b92611203b4562137599f1ad777f729e1db89..91bd5656b74c26baa8f5f8f3d23e57c8a2376c46 100644 (file)
@@ -1902,7 +1902,7 @@ class TypePromotionTransaction {
       Inst->removeFromParent();
     }
 
-    ~InstructionRemover() { delete Replacer; }
+    ~InstructionRemover() override { delete Replacer; }
 
     /// \brief Really remove the instruction.
     void commit() override { delete Inst; }
index ceef74d1a4400f1e694f719c867733653cae3ade..af011a0a65f682cade9efc039df3dfd82ff94477 100644 (file)
@@ -69,7 +69,7 @@ class TargetRegisterInfo;
 
   public:
     CriticalAntiDepBreaker(MachineFunction& MFi, const RegisterClassInfo&);
-    ~CriticalAntiDepBreaker();
+    ~CriticalAntiDepBreaker() override;
 
     /// Initialize anti-dep breaking for a new basic block.
     void StartBlock(MachineBasicBlock *BB) override;
index db7466db6514d709973da50188797487366dcd9f..c7e7e58f397b24185d2d15a76bfe3842fcb7d341 100644 (file)
@@ -135,7 +135,7 @@ private:
   // Dead defs generated during spilling.
   SmallVector<MachineInstr*, 8> DeadDefs;
 
-  ~InlineSpiller() {}
+  ~InlineSpiller() override {}
 
 public:
   InlineSpiller(MachineFunctionPass &pass, MachineFunction &mf, VirtRegMap &vrm)
index 9748329314d6701ee62b0b062396dcd94f525e25..fe296bc4cb5296aacbbe168f6360824c38c84902 100644 (file)
@@ -38,7 +38,7 @@ public:
   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 ad59fc9a4073820c11b73c88a5c3eb11e2fe7942..55f08e496de1ed3ffa8746d4dae6374ab1d66c17 100644 (file)
@@ -141,7 +141,7 @@ namespace {
         TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
         SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs);
 
-    ~SchedulePostRATDList();
+    ~SchedulePostRATDList() override;
 
     /// startBlock - Initialize register live-range state for scheduling in
     /// this block.
index 5222de1063bbcbc3c78f2b0d04476dab50c3d608..fd0fa31842bfefa37398ad31771d922a1e4b9b3a 100644 (file)
@@ -173,7 +173,7 @@ public:
       HazardRec = STI.getInstrInfo()->CreateTargetHazardRecognizer(&STI, this);
   }
 
-  ~ScheduleDAGRRList() {
+  ~ScheduleDAGRRList() override {
     delete HazardRec;
     delete AvailableQueue;
   }
index 2cd1f4b9bd4757f0a0923313a28427affda9f165..6351fa2c4a2f09745905d6dcd83c81d0e3a6f884 100644 (file)
@@ -44,7 +44,7 @@ namespace llvm {
 
     explicit ScheduleDAGSDNodes(MachineFunction &mf);
 
-    virtual ~ScheduleDAGSDNodes() {}
+    ~ScheduleDAGSDNodes() override {}
 
     /// Run - perform scheduling.
     ///
index 418b58eda3943069892e4c39bf8eaac5e8cbee7e..eee4a4b06718646769bc4f633708a27f571497d4 100644 (file)
@@ -76,7 +76,7 @@ public:
     HazardRec = STI.getInstrInfo()->CreateTargetHazardRecognizer(&STI, this);
   }
 
-  ~ScheduleDAGVLIW() {
+  ~ScheduleDAGVLIW() override {
     delete HazardRec;
     delete AvailableQueue;
   }
index 46a5df3d37fca3bc6622184d36c84db51250b6c6..4ff0b9fefcb861ae64b4a27dfb8ef486c937f473 100644 (file)
@@ -2560,7 +2560,7 @@ public:
     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 622361e7e80cbdffa3919aef3bea63d31baaede3..03dd58d6e9a978a52f13d03f5eb2112af5b4d36e 100644 (file)
@@ -70,7 +70,7 @@ public:
   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 6f8c905201d76b6add9beb1e88a3c63db366809a..e5e6f250d3ea41a242e98187f426b6ca6091807b 100644 (file)
@@ -136,9 +136,9 @@ class WinEHFrameVariableMaterializer : public ValueMaterializer {
 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 9f5621414f20ec5f812089868881e7b188110599..784652927ec55c879e8c5022bf6143e5fa76fa4b 100644 (file)
@@ -197,8 +197,7 @@ public:
         DataAlignmentFactor(DataAlignmentFactor),
         ReturnAddressRegister(ReturnAddressRegister) {}
 
-  ~CIE() {
-  }
+  ~CIE() override {}
 
   uint64_t getCodeAlignmentFactor() const { return CodeAlignmentFactor; }
   int64_t getDataAlignmentFactor() const { return DataAlignmentFactor; }
@@ -245,8 +244,7 @@ public:
         InitialLocation(InitialLocation), AddressRange(AddressRange),
         LinkedCIE(Cie) {}
 
-  ~FDE() {
-  }
+  ~FDE() override {}
 
   CIE *getLinkedCIE() const { return LinkedCIE; }
 
index b14af07a9db8432145a490da1b5c0a6219ad4dd8..0aff327366cbda6392dc8c2fe6aa80e37ebd7528 100644 (file)
@@ -48,9 +48,10 @@ public:
     reset();
   }
 
-  uint32_t getChildCount() const { return Args.size(); }
+  uint32_t getChildCount() const override { return Args.size(); }
 
-  std::unique_ptr<PDBSymbolData> getChildAtIndex(uint32_t Index) const {
+  std::unique_ptr<PDBSymbolData>
+  getChildAtIndex(uint32_t Index) const override {
     if (Index >= Args.size())
       return nullptr;
 
@@ -58,7 +59,7 @@ public:
         Args[Index]->getSymIndexId());
   }
 
-  std::unique_ptr<PDBSymbolData> getNext() {
+  std::unique_ptr<PDBSymbolData> getNext() override {
     if (CurIter == Args.end())
       return nullptr;
     const auto &Result = **CurIter;
@@ -66,9 +67,9 @@ public:
     return Session.getConcreteSymbolById<PDBSymbolData>(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 8018206c4cb7d9f892b3b10cad9c558bc1cc853c..af3563f891f8177a105db1be1835bcef811709a3 100644 (file)
@@ -34,25 +34,27 @@ public:
                         std::unique_ptr<ArgEnumeratorType> 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<PDBSymbol> getChildAtIndex(uint32_t Index) const {
+  std::unique_ptr<PDBSymbol> getChildAtIndex(uint32_t Index) const override {
     auto FunctionArgSymbol = Enumerator->getChildAtIndex(Index);
     if (!FunctionArgSymbol)
       return nullptr;
     return Session.getSymbolById(FunctionArgSymbol->getTypeId());
   }
 
-  std::unique_ptr<PDBSymbol> getNext() {
+  std::unique_ptr<PDBSymbol> 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<ArgEnumeratorType> Clone(Enumerator->clone());
     return new FunctionArgEnumerator(Session, std::move(Clone));
   }
index aaa53f0c69539adbdef88af25dec65a012cd5659..22ff3114da081962b21f0b4a5263a0c405c085cb 100644 (file)
@@ -351,7 +351,7 @@ class SimpleBindingMemoryManager : public RTDyldMemoryManager {
 public:
   SimpleBindingMemoryManager(const SimpleBindingMMFunctions& Functions,
                              void *Opaque);
-  virtual ~SimpleBindingMemoryManager();
+  ~SimpleBindingMemoryManager() override;
 
   uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
                                unsigned SectionID,
index 8ef878c2878edceb78f9e6ecb955174d9bc4a117..1ab6203dd6dacb0829d7e7e0e23d6b5bffc2f72a 100644 (file)
@@ -103,7 +103,7 @@ public:
 
   /// 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 2be9c5979d808166d30e1a278020f1f358b81e04..0dc0463903d4d4606c7ef6296d126ee66cae32ac 100644 (file)
@@ -108,7 +108,7 @@ class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
 
 public:
   explicit Interpreter(std::unique_ptr<Module> 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 cee1550d185cc6f376ecb9e217d8774d703f7062..59e99498f9a4940b4715ceab2b92f3513e718059 100644 (file)
@@ -205,7 +205,7 @@ class MCJIT : public ExecutionEngine {
                                                       ModulePtrSet::iterator E);
 
 public:
-  ~MCJIT();
+  ~MCJIT() override;
 
   /// @name ExecutionEngine interface implementation
   /// @{
index 32f5cdb1be980d844f40aee0391085199b8c626a..4023344d2f3d5f6f8196b27cd2ddbe75e2ba420d 100644 (file)
@@ -107,11 +107,12 @@ class OrcMCJITReplacement : public ExecutionEngine {
   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 a15e38141da451ec3ff26f2c354c12543c5e3446..a3ffa3d0bebf022e35c37aff96b34f5dc166d760 100644 (file)
@@ -100,7 +100,7 @@ class RuntimeDyldELF : public RuntimeDyldImpl {
 public:
   RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr,
                  RuntimeDyld::SymbolResolver &Resolver);
-  virtual ~RuntimeDyldELF();
+  ~RuntimeDyldELF() override;
 
   std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
   loadObject(const object::ObjectFile &O) override;
index 9a365d1df1c3ae6bb182f5fc7666e3bb9f82fb90..687003234b6c099587bcb26e857ad532d1361344 100644 (file)
@@ -293,7 +293,7 @@ public:
     Pass(PT_PassManager, ID), PMDataManager() { }
 
   // Delete on the fly managers.
-  virtual ~MPPassManager() {
+  ~MPPassManager() override {
     for (std::map<Pass *, FunctionPassManagerImpl *>::iterator
            I = OnTheFlyManagers.begin(), E = OnTheFlyManagers.end();
          I != E; ++I) {
index 2a55a176629c5d8be6206e981e1cc6c176402869..cc16ac8fa1e232601a5bf3eecbb8e0eb8b35fe70 100644 (file)
@@ -198,7 +198,7 @@ class ELFObjectWriter : public MCObjectWriter {
       MCObjectWriter::reset();
     }
 
-    virtual ~ELFObjectWriter();
+    ~ELFObjectWriter() override;
 
     void WriteWord(uint64_t W) {
       if (is64Bit())
index 5d525eed72424bea92a37b140b7447fc1e0bacb8..92a75074ab5559ac9286e7ba078a7333d1af5b87 100644 (file)
@@ -175,7 +175,7 @@ private:
 public:
   AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
             const MCAsmInfo &MAI);
-  virtual ~AsmParser();
+  ~AsmParser() override;
 
   bool Run(bool NoInitialTextSection, bool NoFinalize = false) override;
 
index 4f72d9a28f6c57b6763371c37b6da0cebd83b639..3cabc54a73aad4a5cb171526d2105a7f53eeaf2e 100644 (file)
@@ -784,7 +784,7 @@ class StrDupSaver : public StringSaver {
   std::vector<char *> Dups;
 
 public:
-  ~StrDupSaver() {
+  ~StrDupSaver() override {
     for (std::vector<char *>::iterator I = Dups.begin(), E = Dups.end(); I != E;
          ++I) {
       char *Dup = *I;
index a44b95804c7ae595c120a610a37e26ae6b447217..c24315526cffc721813af7acb3f65c507c8b9bf9 100644 (file)
@@ -54,9 +54,7 @@ class DataFileStreamer : public DataStreamer {
  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 bc0bd659b5eff957c67f9a5063e6522df8ffafe6..8696a7404c40c5683e645df577896201f46ae8a9 100644 (file)
@@ -26,7 +26,7 @@ class AArch64ELFObjectWriter : public MCELFObjectTargetWriter {
 public:
   AArch64ELFObjectWriter(uint8_t OSABI, bool IsLittleEndian);
 
-  virtual ~AArch64ELFObjectWriter();
+  ~AArch64ELFObjectWriter() override;
 
 protected:
   unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
index da447dbc82a578b574277d879d7d22f6a04617c2..6c9af3b799b3ef9e3f8c043aed518bc13fb40205 100644 (file)
@@ -94,7 +94,7 @@ public:
       : MCELFStreamer(Context, TAB, OS, Emitter), MappingSymbolCounter(0),
         LastEMS(EMS_None) {}
 
-  ~AArch64ELFStreamer() {}
+  ~AArch64ELFStreamer() override {}
 
   void ChangeSection(const MCSection *Section,
                      const MCExpr *Subsection) override {
index 9ea49f0911b670e4fa5e374ee75ae7fe41023b29..fd4dc47f2103f384c6cae2be4b331e92c3424e9a 100644 (file)
@@ -40,7 +40,7 @@ class AArch64MCCodeEmitter : public MCCodeEmitter {
 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 13bef54b3b7da329d90a08377e5571d120f56d00..36f63e239a9e1a11136a17e55c67e62471b633d7 100644 (file)
@@ -86,7 +86,7 @@ protected:
   }
 
 public:
-  virtual ~ARMConstantPoolValue();
+  ~ARMConstantPoolValue() override;
 
   ARMCP::ARMCPModifier getModifier() const { return Modifier; }
   const char *getModifierText() const;
index 4d5122a7620f92a763ff93fc184fb534fdceec6c..4a53e96906df8b4615b58641ade1c0e5621dfcfc 100644 (file)
@@ -91,7 +91,7 @@ public:
     MCDisassembler(STI, Ctx) {
   }
 
-  ~ARMDisassembler() {}
+  ~ARMDisassembler() override {}
 
   DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
                               ArrayRef<uint8_t> Bytes, uint64_t Address,
@@ -106,7 +106,7 @@ public:
     MCDisassembler(STI, Ctx) {
   }
 
-  ~ThumbDisassembler() {}
+  ~ThumbDisassembler() override {}
 
   DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
                               ArrayRef<uint8_t> Bytes, uint64_t Address,
index e06e2efdbe3b2cb151acba4c791a5853dfc9f416..c5d358d764f5f245057400970f07612af9aa03aa 100644 (file)
@@ -32,7 +32,7 @@ namespace {
   public:
     ARMELFObjectWriter(uint8_t OSABI);
 
-    virtual ~ARMELFObjectWriter();
+    ~ARMELFObjectWriter() override;
 
     unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
                           bool IsPCRel) const override;
index e48cabbf7ee22a9fb092930c0812cdcae60e1c9a..6b650f09f7e1ba8393643dc500188ec7398562a5 100644 (file)
@@ -48,7 +48,7 @@ public:
     : MCII(mcii), CTX(ctx), IsLittleEndian(IsLittle) {
   }
 
-  ~ARMMCCodeEmitter() {}
+  ~ARMMCCodeEmitter() override {}
 
   bool isThumb(const MCSubtargetInfo &STI) const {
     return (STI.getFeatureBits() & ARM::ModeThumb) != 0;
index 2fd64456b9143911978fb1e4f8a36327a5227f50..41feaf407c6a669e44c8929e77119d29cc249c2d 100644 (file)
@@ -26,7 +26,7 @@ public:
     : 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 cd82070ab4f98a780c35278594613137cd2eeb56..3ac0a7cc6c102dc7206e4d7e63583ae70ccc8d16 100644 (file)
@@ -27,8 +27,8 @@ private:
 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 a68bf16ee4f72b2a34fce94d180f4b2c429f9032..186b52419c14dce4e69bfed4e47ce65afaef078d 100644 (file)
@@ -27,7 +27,7 @@ namespace {
     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 b01726dbdb062a850211e1509c1005193cf8b7b8..cc40e2e789a4a24a555a16bcf54aaa81f06c51f0 100644 (file)
@@ -43,7 +43,7 @@ public:
   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 1adfdf99c1cf8cf6e6a6b955e5b94da49c080342..ec98027b7c33bc76081d04b4ac6348b8ba8aef15 100644 (file)
@@ -40,7 +40,7 @@ public:
                       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 dc29cbdcae7dc056fae5c1a9ae36b5b1b799e11c..746feab1d9a85355940c201f4c0e35162da5b93e 100644 (file)
@@ -52,7 +52,7 @@ public:
     COP2RegClass = &(TRI->getRegClass(Mips::COP2RegClassID));
     COP3RegClass = &(TRI->getRegClass(Mips::COP3RegClassID));
   }
-  ~MipsRegInfoRecord() {}
+  ~MipsRegInfoRecord() override {}
 
   void EmitMipsOptionRecord() override;
   void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo);
index a9f5fc79459f329299bcca8dc6195d3d510c7a0d..5cbf3d9a189f58ab0c837261c84f6ef41c2c48ee 100644 (file)
@@ -25,7 +25,7 @@ class PPCDisassembler : public MCDisassembler {
 public:
   PPCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
     : MCDisassembler(STI, Ctx) {}
-  virtual ~PPCDisassembler() {}
+  ~PPCDisassembler() override {}
 
   DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size,
                               ArrayRef<uint8_t> Bytes, uint64_t Address,
index b9f0afb9d2a9eb7528b0d47710c2be28462bff05..725b47ba791f336511e168344937f1134a102778 100644 (file)
@@ -44,7 +44,7 @@ public:
       : MCII(mcii), CTX(ctx),
         IsLittleEndian(ctx.getAsmInfo()->isLittleEndian()) {}
 
-  ~PPCMCCodeEmitter() {}
+  ~PPCMCCodeEmitter() override {}
 
   unsigned getDirectBrEncoding(const MCInst &MI, unsigned OpNo,
                                SmallVectorImpl<MCFixup> &Fixups,
index 6493713bfbad74bcc3302b7fbaf983838e3789e3..8aaf5e18890716ad3fc1ed541a2a8a773ae9b6ed 100644 (file)
@@ -16,7 +16,7 @@ namespace llvm {
 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 760aa378e7a89b9f6f5014e83d3cb17240572523..24f2b6dd69fd6b3a8aa38aa333cad536a9656348 100644 (file)
@@ -49,7 +49,7 @@ public:
                   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 931573363944a4316d710891fa5ac3d19c6f895a..2fefd0cd3b55d24cc6abe312bc1fe4cd0861f837 100644 (file)
@@ -26,7 +26,8 @@ namespace {
                                 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 598856f376be99d62028c7c28f2d0a789601c772..b447ab3a75fba3a7cb7f48f62d9c7675340d500c 100644 (file)
@@ -38,7 +38,7 @@ class SparcMCCodeEmitter : public MCCodeEmitter {
 public:
   SparcMCCodeEmitter(MCContext &ctx): Ctx(ctx) {}
 
-  ~SparcMCCodeEmitter() {}
+  ~SparcMCCodeEmitter() override {}
 
   void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
                          SmallVectorImpl<MCFixup> &Fixups,
index a3a21d603b812352700d91d5bbfa331725c96f93..6818291b30b4cdadbd177258d3f0e73404b68227 100644 (file)
@@ -23,7 +23,7 @@ class SparcTargetMachine;
 class SparcSelectionDAGInfo : public TargetSelectionDAGInfo {
 public:
   explicit SparcSelectionDAGInfo(const DataLayout &DL);
-  ~SparcSelectionDAGInfo();
+  ~SparcSelectionDAGInfo() override;
 };
 
 }
index 23173bfbd91bb1b6f2085a61eef6052f8e908b44..84400f828cb82b2031fdd101fc30ff9daea3cd1f 100644 (file)
@@ -25,7 +25,7 @@ class SystemZDisassembler : public MCDisassembler {
 public:
   SystemZDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
     : MCDisassembler(STI, Ctx) {}
-  virtual ~SystemZDisassembler() {}
+  ~SystemZDisassembler() override {}
 
   DecodeStatus getInstruction(MCInst &instr, uint64_t &Size,
                               ArrayRef<uint8_t> Bytes, uint64_t Address,
index 40dc48eeb701e5aa782d022526a672b6848edbb8..8dd70b93351f0431f7fbe0a1a4a7f628820f8b62 100644 (file)
@@ -32,7 +32,7 @@ public:
     : MCII(mcii), Ctx(ctx) {
   }
 
-  ~SystemZMCCodeEmitter() {}
+  ~SystemZMCCodeEmitter() override {}
 
   // OVerride MCCodeEmitter.
   void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
index 263251800d7bb2f808b4107400a663150f400416..35e7e97fecc0051ce158e94df8b17467c263084f 100644 (file)
@@ -20,7 +20,7 @@ class SystemZObjectWriter : public MCELFObjectTargetWriter {
 public:
   SystemZObjectWriter(uint8_t OSABI);
 
-  virtual ~SystemZObjectWriter();
+  ~SystemZObjectWriter() override;
 
 protected:
   // Override MCELFObjectTargetWriter.
index d6f97e64ecf6483e4b4baac7848165bc166a1840..4b4d839931b1a8943aa34b87f4a05f16cc446020 100644 (file)
@@ -22,7 +22,8 @@ namespace {
   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 9b98a3e40d44fa9c16d2fceafe754f71fc3013ef..e27b7cb594674ed1df1ca3c9d897f205709194f0 100644 (file)
@@ -39,7 +39,7 @@ public:
     : MCII(mcii), Ctx(ctx) {
   }
 
-  ~X86MCCodeEmitter() {}
+  ~X86MCCodeEmitter() override {}
 
   bool is64BitMode(const MCSubtargetInfo &STI) const {
     return (STI.getFeatureBits() & X86::Mode64Bit) != 0;
index e1df5c2d3c77d098dd9c8363801bdd67797e4912..50392877ba61e674ce9f5e1304271fdb3e2798be 100644 (file)
@@ -25,7 +25,7 @@ namespace {
   class X86WinCOFFObjectWriter : public MCWinCOFFObjectTargetWriter {
   public:
     X86WinCOFFObjectWriter(bool Is64Bit);
-    virtual ~X86WinCOFFObjectWriter();
+    ~X86WinCOFFObjectWriter() override;
 
     unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup,
                           bool IsCrossSection,
index 48bf0fafb480b9e9a104c01444ec9ca86d167aea..3563dbc5cb7b1f66b7c3fae12af87cc8d100edf4 100644 (file)
@@ -16,7 +16,7 @@ namespace llvm {
 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 5aa2b97c9f493873bcb4fd409c8639ff8d733726..8918909f484ad694933ca67844602023f5b1444c 100644 (file)
@@ -50,9 +50,9 @@ struct AlignmentFromAssumptions : public FunctionPass {
     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<AssumptionCacheTracker>();
     AU.addRequired<ScalarEvolution>();
     AU.addRequired<DominatorTreeWrapperPass>();
index 454724ace5ce1e8c525049bafe12edc4579ccd5d..5d67a9426870a3a3faccefb2146eaa95919b0603 100644 (file)
@@ -165,7 +165,7 @@ public:
     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 895bcdac4d14c2331cfccc7a8468d77394ed7d6f..5733fa53f3e43a4ca7978754a92b68af9ad3bfb0 100644 (file)
@@ -64,7 +64,7 @@ private:
 
 public:
   RemoteMemoryManager() : Target(nullptr) {}
-  virtual ~RemoteMemoryManager();
+  ~RemoteMemoryManager() override;
 
   uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
                                unsigned SectionID,
index bb621f5c50f01476f98e2ec2bda7cb949852362b..afe8570ff49fbf90c279f070ef3aa1681061eb96 100644 (file)
@@ -106,7 +106,7 @@ public:
   void stop() override;
 
   RemoteTargetExternal(std::string &Name) : RemoteTarget(), ChildName(Name) {}
-  virtual ~RemoteTargetExternal() {}
+  ~RemoteTargetExternal() override {}
 
 private:
   std::string ChildName;
index 47ce2c0ac34ef85dba894c622a16767c1d9db48a..c1e3522743ad363861c96e6fffa22b0efb044815 100644 (file)
@@ -271,7 +271,7 @@ public:
         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 370b7c20a0934062bcc2c9bf5fa873be8cc6afe6..190df7f57470706985856e19289513231218479e 100644 (file)
@@ -22,7 +22,7 @@ class FixedDAGDeltaAlgorithm : public DAGDeltaAlgorithm {
   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 a33f2b4bc1a57b8ecc56e9f33c1e5254a1138ef5..bed57b1a17254e1279ee34d1e849910e5abca4a0 100644 (file)
@@ -37,7 +37,7 @@ class FixedDeltaAlgorithm final : public DeltaAlgorithm {
   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 97ff90b78f02a82b5cf9ac6236354d7592ecdb28..46f7021ac165d537dcd1891e3f124aa782234ccb 100644 (file)
@@ -156,10 +156,7 @@ LLVM_ATTRIBUTE_USED void CompileTest() {
 
 class SmallVectorTestBase : public testing::Test {
 protected:
-
-  void SetUp() {
-    Constructable::reset();
-  }
+  void SetUp() override { Constructable::reset(); }
 
   template <typename VectorT>
   void assertEmpty(VectorT & v) {
index 4b4ebb610ef035afe888b68f3863965a43101b96..b29c168ce08b3bee15b07579e999e3ca83ec321c 100644 (file)
@@ -78,13 +78,13 @@ protected:
         return 0;
       }
 
-      void getAnalysisUsage(AnalysisUsage &AU) const {
+      void getAnalysisUsage(AnalysisUsage &AU) const override {
         AU.setPreservesAll();
         AU.addRequired<LoopInfoWrapperPass>();
         AU.addRequired<DominatorTreeWrapperPass>();
       }
 
-      bool runOnFunction(Function &F) {
+      bool runOnFunction(Function &F) override {
         if (!F.hasName() || F.getName() != "test")
           return false;
 
index 876a2644b3a8036e84e7e730b570d65c38fdb882..6ce7ff43a312f95ee18fa01852eaa233b9473ad5 100644 (file)
@@ -25,7 +25,7 @@ namespace {
 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 80d4ea2db456f4f9ce85da295859d9c845e35e14..bb47c4c00304c780294d111c3d4549a2a1fd2b27 100644 (file)
@@ -33,7 +33,7 @@ protected:
     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 f2a3000906e327840d854bbbe06f6831bd7ff5e6..a7c9ae02b384d50b6a5fcd667b371ba445e69a81 100644 (file)
@@ -85,13 +85,11 @@ public:
     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 @@ public:
     *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 @@ protected:
     // 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 @@ protected:
     Engine = nullptr;
     Error = nullptr;
   }
-  
-  virtual void TearDown() {
+
+  void TearDown() override {
     if (Engine)
       LLVMDisposeExecutionEngine(Engine);
     else if (Module)
index 2e38dd88b0fdcad3a4c8adfae16a4d533d913b4a..ff5b6e3deccca61fd6e0ec9c151e70254c005119 100644 (file)
@@ -33,7 +33,7 @@ public:
     ObjMap[ModuleID] = copyBuffer(Obj);
   }
 
-  virtual std::unique_ptr<MemoryBuffer> getObject(const Module* M) override {
+  std::unique_ptr<MemoryBuffer> getObject(const Module *M) override {
     const MemoryBuffer* BufferFound = getObjectInternal(M);
     ModulesLookedUp.insert(M->getModuleIdentifier());
     if (!BufferFound)
@@ -84,7 +84,7 @@ protected:
     ReplacementRC = 7
   };
 
-  virtual void SetUp() {
+  void SetUp() override {
     M.reset(createEmptyModule("<main>"));
     Main = insertMainFunction(M.get(), OriginalRC);
   }
index 64d8c2fca042aedcc26478d8ccc0fe52a69d1aa5..94b9a6927b19b450241448ffc0f9ca2ec918304d 100644 (file)
@@ -22,7 +22,7 @@ namespace {
 
 class MCJITTest : public testing::Test, public MCJITTestBase {
 protected:
-  virtual void SetUp() { M.reset(createEmptyModule("<main>")); }
+  void SetUp() override { M.reset(createEmptyModule("<main>")); }
 };
 
 // FIXME: Ensure creating an execution engine does not crash when constructed
index 8d2dc41ca138b51d00dd29cb61c75c98c6453872..287a944845432d6c900b170d420ed00fd8cf1364 100644 (file)
@@ -25,7 +25,7 @@ namespace llvm {
   namespace {
     struct DPass : public FunctionPass {
       static char ID;
-      virtual bool runOnFunction(Function &F) {
+      bool runOnFunction(Function &F) override {
         DominatorTree *DT =
             &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
         PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>();
@@ -176,7 +176,7 @@ namespace llvm {
 
         return false;
       }
-      virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      void getAnalysisUsage(AnalysisUsage &AU) const override {
         AU.addRequired<DominatorTreeWrapperPass>();
         AU.addRequired<PostDominatorTree>();
       }
index cf189b1fb11deea50b51e0a2b0758b52a86873a9..9fe241c1a74c4cebcc84f3e3126f11545a3206b8 100644 (file)
@@ -26,7 +26,7 @@ namespace {
 
 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 @@ protected:
                             GlobalValue::ExternalLinkage, nullptr);
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     BB = nullptr;
     M.reset();
   }
index 403d2bcbda16ef8c4e03c08d8bc3479cc54fac30..6000c4a3105ce844def7b5d7c2e4427b4e48d29c 100644 (file)
@@ -244,8 +244,11 @@ TEST_F(ValueHandle, CallbackVH_CallbackOnDeletion) {
     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 @@ TEST_F(ValueHandle, CallbackVH_CallbackOnRAUW) {
       : 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 @@ TEST_F(ValueHandle, CallbackVH_DeletionCanRAUW) {
         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 @@ TEST_F(ValueHandle, DestroyingOtherVHOnSameValueDoesntBreakIteration) {
       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 @@ TEST_F(ValueHandle, AssertingVHCheckedLast) {
       ToClear[1] = &A1;
     }
 
-    virtual void deleted() {
+    void deleted() override {
       *ToClear[0] = nullptr;
       *ToClear[1] = nullptr;
       CallbackVH::deleted();
index 26053c0ede24178b4d6e1bd0b5a06e80c86b36ad..4d9081fd5c201ee02ccefa53f16191b12ad7b407 100644 (file)
@@ -29,7 +29,7 @@ public:
     LE = new LineEditor("test", HistPath);
   }
 
-  ~LineEditorTest() {
+  ~LineEditorTest() override {
     delete LE;
     sys::fs::remove(HistPath.str());
   }
index fbd03639fa704bf1e7d8ce20a5dd2b1326643ffe..b4689cba560e8a540a4ec3159a9ec95fddd8de1f 100644 (file)
@@ -23,7 +23,7 @@ namespace {
 
 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 @@ protected:
     GV->setInitializer(ConstantArray::get(AT, Init));
   }
 
-  virtual void TearDown() { M.reset(); }
+  void TearDown() override { M.reset(); }
 
   LLVMContext Ctx;
   std::unique_ptr<Module> M;
index b9d423e8eee88eeeef7dca8e8098994f9b932349..e0859fc747f4c2f0b5340738c161ed3fbc55f0f6 100644 (file)
@@ -61,12 +61,22 @@ struct D8 : S1, D4, D5 { double x[2]; };
 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 9d7679da511c5b2addd7062f2618a8ba229e9a9f..328c4b7fcf300193b19e01a824fa70a4d3d4a90d 100644 (file)
@@ -65,9 +65,7 @@ public:
   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 1cdd6adbf8ba3aec52716eb6e8875636e497bbb9..ffb809aa207b2157948e593159a35d90d3bdf052 100644 (file)
@@ -26,7 +26,7 @@ protected:
   : 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 479812c1eaaa98f809e502d5c45fc6bac6fe0e02..262d27260ce43e9b4f6543149ce4b20e024b6aa0 100644 (file)
@@ -308,7 +308,7 @@ protected:
   /// 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 @@ protected:
     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 49e798b66440c41bbb963176d386e0075fc99e8c..b2f71c9953feb80f37681bf24950160b1da9e490 100644 (file)
@@ -31,9 +31,7 @@ namespace {
 
 class CloneInstruction : public ::testing::Test {
 protected:
-  virtual void SetUp() {
-    V = nullptr;
-  }
+  void SetUp() override { V = nullptr; }
 
   template <typename T>
   T *clone(T *V1) {
@@ -47,7 +45,7 @@ protected:
     DeleteContainerPointers(Clones);
   }
 
-  virtual void TearDown() {
+  void TearDown() override {
     eraseClones();
     DeleteContainerPointers(Orig);
     delete V;
@@ -206,16 +204,14 @@ TEST_F(CloneInstruction, CallingConvention) {
 
 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 9df3b410ff2680277695d923e53f56b262eb566d..a8a6ba5c32e15dc0a81c980eec105790f1ec2d54 100644 (file)
@@ -194,7 +194,7 @@ public:
   ScopeMatcher(ArrayRef<Matcher *> children)
     : Matcher(Scope), Children(children.begin(), children.end()) {
   }
-  virtual ~ScopeMatcher();
+  ~ScopeMatcher() override;
 
   unsigned getNumChildren() const { return Children.size(); }
 
@@ -507,7 +507,7 @@ class SwitchOpcodeMatcher : public Matcher {
 public:
   SwitchOpcodeMatcher(ArrayRef<std::pair<const SDNodeInfo*, Matcher*> > 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 @@ class SwitchTypeMatcher : public Matcher {
 public:
   SwitchTypeMatcher(ArrayRef<std::pair<MVT::SimpleValueType, Matcher*> > cases)
   : Matcher(SwitchType), Cases(cases.begin(), cases.end()) {}
-  virtual ~SwitchTypeMatcher();
+  ~SwitchTypeMatcher() override;
 
   static inline bool classof(const Matcher *N) {
     return N->getKind() == SwitchType;
index b226e550489596aada09dd560448f99a2f0b9fee..736f692e48f7597552ca8b5daece6079defede4a 100644 (file)
@@ -68,14 +68,15 @@ class GTEST_API_ ScopedFakeTestPartResultReporter
                                    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 98e8b844915d17aff9336835e01cc04e1c17af70..d2410c00a3ffb698f0ec72049c9da64305a68be5 100644 (file)
@@ -159,8 +159,8 @@ class GTEST_API_ HasNewFatalFailureHelper
     : 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 257cee69d584a9afb41c384132db0b894d4bc55d..92ca5cc91c82b81b950328223a89f3b4402c7a23 100644 (file)
@@ -982,21 +982,22 @@ class TestEventListener {
 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 8d53c4528078bf9ba6c181b8a711961dcb5588da..04c676ce5ff7bc86d1349521b6c25574ac063016 100644 (file)
@@ -147,8 +147,8 @@ class DeathTestFactory {
 // 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 63f72acdfb572592997bf02e5c879b932cdf5bfd..3c7eee81b1d91503a35ed0b9520f500c27b0b362 100644 (file)
@@ -555,7 +555,7 @@ class TestFactoryBase {
 template <class TestClass>
 class TestFactoryImpl : public TestFactoryBase {
  public:
-  virtual Test* CreateTest() { return new TestClass; }
+   Test *CreateTest() override { return new TestClass; }
 };
 
 #if GTEST_OS_WINDOWS
index 3bb2ffb3556666eddd434588ef3179c2ade697b4..dea4d5cc6bcb1eb3f2550a166d219973f5a51ad1 100644 (file)
@@ -270,12 +270,12 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
   template <typename ForwardIterator>
   ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
       : container_(begin, end) {}
-  virtual ~ValuesInIteratorRangeGenerator() {}
+  ~ValuesInIteratorRangeGenerator() override {}
 
-  virtual ParamIteratorInterface<T>* Begin() const {
+  ParamIteratorInterface<T> *Begin() const override {
     return new Iterator(this, container_.begin());
   }
-  virtual ParamIteratorInterface<T>* End() const {
+  ParamIteratorInterface<T> *End() const override {
     return new Iterator(this, container_.end());
   }
 
@@ -287,16 +287,16 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
     Iterator(const ParamGeneratorInterface<T>* base,
              typename ContainerType::const_iterator iterator)
         : base_(base), iterator_(iterator) {}
-    virtual ~Iterator() {}
+    ~Iterator() override {}
 
-    virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
+    const ParamGeneratorInterface<T> *BaseGenerator() const override {
       return base_;
     }
-    virtual void Advance() {
+    void Advance() override {
       ++iterator_;
       value_.reset();
     }
-    virtual ParamIteratorInterface<T>* Clone() const {
+    ParamIteratorInterface<T> *Clone() const override {
       return new Iterator(*this);
     }
     // We need to use cached value referenced by iterator_ because *iterator_
@@ -306,12 +306,12 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
     // 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<T>& other) const {
+    bool Equals(const ParamIteratorInterface<T> &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 @@ class ParameterizedTestFactory : public TestFactoryBase {
   typedef typename TestClass::ParamType ParamType;
   explicit ParameterizedTestFactory(ParamType parameter) :
       parameter_(parameter) {}
-  virtual Test* CreateTest() {
+  Test *CreateTest() override {
     TestClass::SetParam(&parameter_);
     return new TestClass();
   }
@@ -394,7 +394,7 @@ class TestMetaFactory
 
   TestMetaFactory() {}
 
-  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {
+  TestFactoryBase *CreateTestFactory(ParamType parameter) override {
     return new ParameterizedTestFactory<TestCase>(parameter);
   }
 
@@ -454,9 +454,9 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
       : 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<TestCase>(); }
+  TypeId GetTestCaseTypeId() const override { return GetTypeId<TestCase>(); }
   // 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 @@ class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
   // 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<TestInfo> test_info = *test_it;
index 9ddcea1fbf99d321f9e38c7cb10f7505de76ba52..6b942e9f9d9e79839ed73c9eb18effbb46b487d4 100644 (file)
@@ -1165,7 +1165,7 @@ class ThreadWithParam : public ThreadWithParamBase {
     GTEST_CHECK_POSIX_SUCCESS_(
         pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
   }
-  ~ThreadWithParam() { Join(); }
+  ~ThreadWithParam() override { Join(); }
 
   void Join() {
     if (!finished_) {
@@ -1174,7 +1174,7 @@ class ThreadWithParam : public ThreadWithParamBase {
     }
   }
 
-  virtual void Run() {
+  void Run() override {
     if (thread_can_start_ != NULL)
       thread_can_start_->WaitForNotification();
     func_(param_);
index 314dba2116e97145cf895c7eac1228e704fb6888..47c1a15b820cd3c43e98eb4a67363a8585a508e6 100644 (file)
@@ -334,10 +334,10 @@ class DeathTestImpl : public DeathTest {
         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 @@ class ForkingDeathTest : public DeathTestImpl {
   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 @@ class NoExecDeathTest : public ForkingDeathTest {
  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 @@ class ExecDeathTest : public ForkingDeathTest {
   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 1bae630127b52a449e0d0d26f9abb5ff42d7b35f..35e865ff07fe94f9699acc0f6a78999081290ac6 100644 (file)
@@ -431,8 +431,8 @@ class OsStackTraceGetterInterface {
 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 @@ class DefaultGlobalTestPartResultReporter
   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 @@ class DefaultPerThreadTestPartResultReporter
   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 bf850c6cd97746bdcaad50a09ca75f84f84ae1c1..57807646ea1738b9a8815d528cc915ae15704305 100644 (file)
@@ -2663,19 +2663,19 @@ class PrettyUnitTestResultPrinter : public TestEventListener {
   }
 
   // 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 @@ void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
 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 @@ class TestEventRepeater : public TestEventListener {
   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 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener {
  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 @@ class StreamingListener : public EmptyTestEventListener {
     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 @@ class StreamingListener : public EmptyTestEventListener {
     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 = "";