From 629b96cb4f278cc78bfd5679e91315cb6e1ed164 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 2 Mar 2014 09:09:27 +0000 Subject: [PATCH] Switch all uses of LLVM_OVERRIDE to just use 'override' directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202621 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineScheduler.h | 8 +- .../llvm/CodeGen/TargetLoweringObjectFileImpl.h | 83 +++++++------- include/llvm/IR/InstrTypes.h | 6 +- include/llvm/MC/MCAtom.h | 8 +- include/llvm/MC/MCObjectDisassembler.h | 10 +- include/llvm/Object/COFF.h | 116 +++++++++---------- include/llvm/Object/ELFObjectFile.h | 104 ++++++++--------- include/llvm/Object/IRObjectFile.h | 11 +- include/llvm/Object/MachO.h | 123 +++++++++------------ include/llvm/Support/Allocator.h | 4 +- include/llvm/Support/CommandLine.h | 10 +- include/llvm/Support/FormattedStream.h | 4 +- include/llvm/Support/PrettyStackTrace.h | 4 +- include/llvm/Support/StreamableMemoryObject.h | 22 ++-- include/llvm/Support/StringRefMemoryObject.h | 8 +- include/llvm/Support/YAMLParser.h | 6 +- include/llvm/Support/circular_raw_ostream.h | 4 +- include/llvm/Support/raw_os_ostream.h | 4 +- include/llvm/Support/raw_ostream.h | 28 ++--- include/llvm/Support/system_error.h | 2 +- lib/Analysis/TargetTransformInfo.cpp | 94 ++++++++-------- lib/Bitcode/Reader/BitcodeReader.cpp | 4 +- lib/CodeGen/AsmPrinter/DwarfUnit.h | 8 +- lib/CodeGen/BasicTargetTransformInfo.cpp | 58 +++++----- lib/CodeGen/MachineScheduler.cpp | 34 +++--- lib/DebugInfo/DWARFCompileUnit.h | 2 +- lib/DebugInfo/DWARFTypeUnit.h | 4 +- lib/MC/MCAsmStreamer.cpp | 2 +- lib/MC/MCObjectSymbolizer.cpp | 7 +- lib/Support/CommandLine.cpp | 2 +- lib/Support/DAGDeltaAlgorithm.cpp | 4 +- lib/Support/DataStream.cpp | 2 +- lib/Support/MemoryBuffer.cpp | 8 +- lib/Support/StreamableMemoryObject.cpp | 14 +-- lib/Support/system_error.cpp | 10 +- lib/Target/AArch64/AArch64ISelLowering.h | 4 +- lib/Target/AArch64/AArch64TargetTransformInfo.cpp | 6 +- lib/Target/ARM/ARMAsmPrinter.h | 29 +++-- lib/Target/ARM/ARMTargetObjectFile.h | 9 +- lib/Target/ARM/ARMTargetTransformInfo.cpp | 8 +- lib/Target/Hexagon/HexagonMachineScheduler.h | 12 +- lib/Target/Hexagon/HexagonTargetObjectFile.h | 7 +- lib/Target/Mips/MipsAsmPrinter.h | 2 +- lib/Target/Mips/MipsSEISelLowering.h | 5 +- lib/Target/Mips/MipsTargetObjectFile.h | 7 +- lib/Target/Mips/MipsTargetStreamer.h | 4 +- lib/Target/NVPTX/NVPTXTargetMachine.cpp | 2 +- lib/Target/NVPTX/NVPTXTargetObjectFile.h | 9 +- .../PowerPC/Disassembler/PPCDisassembler.cpp | 2 +- lib/Target/PowerPC/PPCTargetObjectFile.h | 10 +- lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 28 ++--- lib/Target/R600/AMDGPUISelLowering.h | 12 +- lib/Target/R600/AMDGPUTargetTransformInfo.cpp | 8 +- lib/Target/Sparc/SparcTargetObjectFile.h | 4 +- lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp | 30 ++--- .../SystemZ/Disassembler/SystemZDisassembler.cpp | 2 +- .../SystemZ/InstPrinter/SystemZInstPrinter.h | 7 +- .../SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp | 21 ++-- lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h | 4 +- .../SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp | 3 +- .../SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp | 4 +- lib/Target/SystemZ/SystemZAsmPrinter.h | 14 +-- lib/Target/SystemZ/SystemZConstantPoolValue.h | 8 +- lib/Target/SystemZ/SystemZFrameLowering.h | 27 ++--- lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 11 +- lib/Target/SystemZ/SystemZISelLowering.h | 47 ++++---- lib/Target/SystemZ/SystemZInstrInfo.h | 57 +++++----- lib/Target/SystemZ/SystemZRegisterInfo.h | 24 ++-- lib/Target/SystemZ/SystemZSelectionDAGInfo.h | 19 ++-- lib/Target/SystemZ/SystemZSubtarget.h | 2 +- lib/Target/SystemZ/SystemZTargetMachine.cpp | 8 +- lib/Target/SystemZ/SystemZTargetMachine.h | 17 ++- .../X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp | 2 +- lib/Target/X86/X86AsmPrinter.h | 14 +-- lib/Target/X86/X86ISelLowering.h | 3 +- lib/Target/X86/X86InstrInfo.h | 2 +- lib/Target/X86/X86Subtarget.h | 2 +- lib/Target/X86/X86TargetObjectFile.h | 19 ++-- lib/Target/X86/X86TargetTransformInfo.cpp | 40 ++++--- .../XCore/MCTargetDesc/XCoreMCTargetDesc.cpp | 8 +- lib/Target/XCore/XCoreTargetObjectFile.h | 23 ++-- lib/Target/XCore/XCoreTargetTransformInfo.cpp | 8 +- lib/Transforms/Scalar/TailRecursionElimination.cpp | 6 +- tools/llvm-readobj/COFFDumper.cpp | 12 +- tools/llvm-readobj/ELFDumper.cpp | 24 ++-- tools/llvm-readobj/MachODumper.cpp | 12 +- unittests/Support/CommandLineTest.cpp | 2 +- 87 files changed, 695 insertions(+), 773 deletions(-) diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h index 421f8a1caa1..d147aaa22df 100644 --- a/include/llvm/CodeGen/MachineScheduler.h +++ b/include/llvm/CodeGen/MachineScheduler.h @@ -290,7 +290,7 @@ public: void enterRegion(MachineBasicBlock *bb, MachineBasicBlock::iterator begin, MachineBasicBlock::iterator end, - unsigned regioninstrs) LLVM_OVERRIDE; + unsigned regioninstrs) override; /// Implement ScheduleDAGInstrs interface for scheduling a sequence of /// reorderable instructions. @@ -304,8 +304,8 @@ public: const SUnit *getNextClusterSucc() const { return NextClusterSucc; } - void viewGraph(const Twine &Name, const Twine &Title) LLVM_OVERRIDE; - void viewGraph() LLVM_OVERRIDE; + void viewGraph(const Twine &Name, const Twine &Title) override; + void viewGraph() override; protected: // Top-Level entry points for the schedule() driver... @@ -423,7 +423,7 @@ public: void enterRegion(MachineBasicBlock *bb, MachineBasicBlock::iterator begin, MachineBasicBlock::iterator end, - unsigned regioninstrs) LLVM_OVERRIDE; + unsigned regioninstrs) override; /// Implement ScheduleDAGInstrs interface for scheduling a sequence of /// reorderable instructions. diff --git a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h index d329ddd9a74..fd4fa46f09d 100644 --- a/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h +++ b/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h @@ -39,40 +39,38 @@ public: virtual ~TargetLoweringObjectFileELF() {} void emitPersonalityValue(MCStreamer &Streamer, const TargetMachine &TM, - const MCSymbol *Sym) const LLVM_OVERRIDE; + const MCSymbol *Sym) const override; /// Given a constant with the SectionKind, return a section that it should be /// placed in. - const MCSection *getSectionForConstant(SectionKind Kind) const LLVM_OVERRIDE; + const MCSection *getSectionForConstant(SectionKind Kind) const override; const MCSection *getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; /// Return an MCExpr to use for a reference to the specified type info global /// variable from exception handling information. const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, MCStreamer &Streamer) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI, + MCStreamer &Streamer) const override; // The symbol that gets passed to .cfi_personality. MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI) const LLVM_OVERRIDE; + MachineModuleInfo *MMI) const override; void InitializeELF(bool UseInitArray_); - const MCSection *getStaticCtorSection(unsigned Priority = 65535) const - LLVM_OVERRIDE; - const MCSection *getStaticDtorSection(unsigned Priority = 65535) const - LLVM_OVERRIDE; + const MCSection * + getStaticCtorSection(unsigned Priority = 65535) const override; + const MCSection * + getStaticDtorSection(unsigned Priority = 65535) const override; }; @@ -83,46 +81,44 @@ public: /// Extract the dependent library name from a linker option string. Returns /// StringRef() if the option does not specify a library. - StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const LLVM_OVERRIDE; + StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const override; /// Emit the module flags that specify the garbage collection information. void emitModuleFlags(MCStreamer &Streamer, ArrayRef ModuleFlags, - Mangler &Mang, const TargetMachine &TM) const - LLVM_OVERRIDE; + Mangler &Mang, const TargetMachine &TM) const override; - bool isSectionAtomizableBySymbols(const MCSection &Section) const - LLVM_OVERRIDE; + bool isSectionAtomizableBySymbols(const MCSection &Section) const override; - const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + const MCSection * + SelectSectionForGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; - const MCSection *getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + const MCSection * + getExplicitSectionGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; - const MCSection *getSectionForConstant(SectionKind Kind) const LLVM_OVERRIDE; + const MCSection *getSectionForConstant(SectionKind Kind) const override; /// This hook allows targets to selectively decide not to emit the /// UsedDirective for some symbols in llvm.used. /// FIXME: REMOVE this (rdar://7071300) bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler &Mang, - TargetMachine &TM) const LLVM_OVERRIDE; + TargetMachine &TM) const override; /// The mach-o version of this method defaults to returning a stub reference. const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, MCStreamer &Streamer) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI, + MCStreamer &Streamer) const override; // The symbol that gets passed to .cfi_personality. MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI) const LLVM_OVERRIDE; + MachineModuleInfo *MMI) const override; }; @@ -131,26 +127,25 @@ class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile { public: virtual ~TargetLoweringObjectFileCOFF() {} - const MCSection *getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + const MCSection * + getExplicitSectionGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; - const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + const MCSection * + SelectSectionForGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; /// Extract the dependent library name from a linker option string. Returns /// StringRef() if the option does not specify a library. - StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const LLVM_OVERRIDE; + StringRef getDepLibFromLinkerOpt(StringRef LinkerOption) const override; /// Emit Obj-C garbage collection and linker options. Only linker option /// emission is implemented for COFF. void emitModuleFlags(MCStreamer &Streamer, ArrayRef ModuleFlags, - Mangler &Mang, const TargetMachine &TM) const - LLVM_OVERRIDE; + Mangler &Mang, const TargetMachine &TM) const override; }; } // end namespace llvm diff --git a/include/llvm/IR/InstrTypes.h b/include/llvm/IR/InstrTypes.h index e12bb03a403..cbf6fee5066 100644 --- a/include/llvm/IR/InstrTypes.h +++ b/include/llvm/IR/InstrTypes.h @@ -143,7 +143,7 @@ protected: const Twine &Name, Instruction *InsertBefore); BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd); - virtual BinaryOperator *clone_impl() const LLVM_OVERRIDE; + virtual BinaryOperator *clone_impl() const override; public: // allocate space for exactly two operands void *operator new(size_t s) { @@ -385,7 +385,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value) /// if (isa(Instr)) { ... } /// @brief Base class of casting instructions. class CastInst : public UnaryInstruction { - virtual void anchor() LLVM_OVERRIDE; + virtual void anchor() override; protected: /// @brief Constructor with insert-before-instruction semantics for subclasses CastInst(Type *Ty, unsigned iType, Value *S, @@ -642,7 +642,7 @@ protected: Value *LHS, Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd); - virtual void anchor() LLVM_OVERRIDE; // Out of line virtual method. + virtual void anchor() override; // Out of line virtual method. public: /// This enumeration lists the possible predicates for CmpInst subclasses. /// Values in the range 0-31 are reserved for FCmpInst, while values in the diff --git a/include/llvm/MC/MCAtom.h b/include/llvm/MC/MCAtom.h index eab32d691fa..e9d0fbacc1e 100644 --- a/include/llvm/MC/MCAtom.h +++ b/include/llvm/MC/MCAtom.h @@ -145,8 +145,8 @@ public: /// \name Atom type specific split/truncate logic. /// @{ - MCTextAtom *split(uint64_t SplitPt) LLVM_OVERRIDE; - void truncate(uint64_t TruncPt) LLVM_OVERRIDE; + MCTextAtom *split(uint64_t SplitPt) override; + void truncate(uint64_t TruncPt) override; /// @} // Class hierarchy. @@ -179,8 +179,8 @@ public: /// \name Atom type specific split/truncate logic. /// @{ - MCDataAtom *split(uint64_t SplitPt) LLVM_OVERRIDE; - void truncate(uint64_t TruncPt) LLVM_OVERRIDE; + MCDataAtom *split(uint64_t SplitPt) override; + void truncate(uint64_t TruncPt) override; /// @} // Class hierarchy. diff --git a/include/llvm/MC/MCObjectDisassembler.h b/include/llvm/MC/MCObjectDisassembler.h index 0d87d33bab9..fedc9b03089 100644 --- a/include/llvm/MC/MCObjectDisassembler.h +++ b/include/llvm/MC/MCObjectDisassembler.h @@ -162,12 +162,12 @@ public: uint64_t HeaderLoadAddress); protected: - uint64_t getEffectiveLoadAddr(uint64_t Addr) LLVM_OVERRIDE; - uint64_t getOriginalLoadAddr(uint64_t EffectiveAddr) LLVM_OVERRIDE; - uint64_t getEntrypoint() LLVM_OVERRIDE; + uint64_t getEffectiveLoadAddr(uint64_t Addr) override; + uint64_t getOriginalLoadAddr(uint64_t EffectiveAddr) override; + uint64_t getEntrypoint() override; - ArrayRef getStaticInitFunctions() LLVM_OVERRIDE; - ArrayRef getStaticExitFunctions() LLVM_OVERRIDE; + ArrayRef getStaticInitFunctions() override; + ArrayRef getStaticExitFunctions() override; }; } diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 7ca7c43668f..6bf059b9ea4 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -300,82 +300,70 @@ private: error_code initExportTablePtr(); protected: - void moveSymbolNext(DataRefImpl &Symb) const LLVM_OVERRIDE; - error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolFileOffset(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const LLVM_OVERRIDE; - uint32_t getSymbolFlags(DataRefImpl Symb) const LLVM_OVERRIDE; - error_code getSymbolType(DataRefImpl Symb, SymbolRef::Type &Res) const - LLVM_OVERRIDE; - error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const - LLVM_OVERRIDE; - error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const - LLVM_OVERRIDE; - void moveSectionNext(DataRefImpl &Sec) const LLVM_OVERRIDE; - error_code getSectionName(DataRefImpl Sec, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const LLVM_OVERRIDE; - error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code isSectionText(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionData(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionBSS(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const - LLVM_OVERRIDE; - error_code isSectionRequiredForExecution(DataRefImpl Sec, bool &Res) const - LLVM_OVERRIDE; + void moveSymbolNext(DataRefImpl &Symb) const override; + error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const override; + error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const override; + error_code getSymbolFileOffset(DataRefImpl Symb, + uint64_t &Res) const override; + error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const override; + uint32_t getSymbolFlags(DataRefImpl Symb) const override; + error_code getSymbolType(DataRefImpl Symb, + SymbolRef::Type &Res) const override; + error_code getSymbolSection(DataRefImpl Symb, + section_iterator &Res) const override; + error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const override; + void moveSectionNext(DataRefImpl &Sec) const override; + error_code getSectionName(DataRefImpl Sec, StringRef &Res) const override; + error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const override; + error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const override; + error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const override; + error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const override; + error_code isSectionText(DataRefImpl Sec, bool &Res) const override; + error_code isSectionData(DataRefImpl Sec, bool &Res) const override; + error_code isSectionBSS(DataRefImpl Sec, bool &Res) const override; + error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const override; + error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const override; + error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const override; + error_code isSectionRequiredForExecution(DataRefImpl Sec, + bool &Res) const override; error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb, - bool &Result) const LLVM_OVERRIDE; - relocation_iterator section_rel_begin(DataRefImpl Sec) const LLVM_OVERRIDE; - relocation_iterator section_rel_end(DataRefImpl Sec) const LLVM_OVERRIDE; - - void moveRelocationNext(DataRefImpl &Rel) const LLVM_OVERRIDE; - error_code getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const LLVM_OVERRIDE; - error_code getRelocationType(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; + bool &Result) const override; + relocation_iterator section_rel_begin(DataRefImpl Sec) const override; + relocation_iterator section_rel_end(DataRefImpl Sec) const override; + + void moveRelocationNext(DataRefImpl &Rel) const override; + error_code getRelocationAddress(DataRefImpl Rel, + uint64_t &Res) const override; + error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const override; + symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; + error_code getRelocationType(DataRefImpl Rel, uint64_t &Res) const override; error_code getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; error_code getRelocationValueString(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; - error_code getLibraryNext(DataRefImpl LibData, LibraryRef &Result) const - LLVM_OVERRIDE; - error_code getLibraryPath(DataRefImpl LibData, StringRef &Result) const - LLVM_OVERRIDE; + error_code getLibraryNext(DataRefImpl LibData, + LibraryRef &Result) const override; + error_code getLibraryPath(DataRefImpl LibData, + StringRef &Result) const override; public: COFFObjectFile(MemoryBuffer *Object, error_code &EC, bool BufferOwned = true); - basic_symbol_iterator symbol_begin_impl() const LLVM_OVERRIDE; - basic_symbol_iterator symbol_end_impl() const LLVM_OVERRIDE; - library_iterator needed_library_begin() const LLVM_OVERRIDE; - library_iterator needed_library_end() const LLVM_OVERRIDE; - section_iterator section_begin() const LLVM_OVERRIDE; - section_iterator section_end() const LLVM_OVERRIDE; + basic_symbol_iterator symbol_begin_impl() const override; + basic_symbol_iterator symbol_end_impl() const override; + library_iterator needed_library_begin() const override; + library_iterator needed_library_end() const override; + section_iterator section_begin() const override; + section_iterator section_end() const override; const coff_section *getCOFFSection(section_iterator &It) const; const coff_symbol *getCOFFSymbol(symbol_iterator &It) const; const coff_relocation *getCOFFRelocation(relocation_iterator &It) const; - uint8_t getBytesInAddress() const LLVM_OVERRIDE; - StringRef getFileFormatName() const LLVM_OVERRIDE; - unsigned getArch() const LLVM_OVERRIDE; - StringRef getLoadName() const LLVM_OVERRIDE; + uint8_t getBytesInAddress() const override; + StringRef getFileFormatName() const override; + unsigned getArch() const override; + StringRef getLoadName() const override; import_directory_iterator import_directory_begin() const; import_directory_iterator import_directory_end() const; diff --git a/include/llvm/Object/ELFObjectFile.h b/include/llvm/Object/ELFObjectFile.h index 93d29662545..3c87e529c02 100644 --- a/include/llvm/Object/ELFObjectFile.h +++ b/include/llvm/Object/ELFObjectFile.h @@ -55,64 +55,54 @@ public: protected: ELFFile EF; - void moveSymbolNext(DataRefImpl &Symb) const LLVM_OVERRIDE; - error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSymbolFileOffset(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const LLVM_OVERRIDE; - uint32_t getSymbolFlags(DataRefImpl Symb) const LLVM_OVERRIDE; - error_code getSymbolType(DataRefImpl Symb, SymbolRef::Type &Res) const - LLVM_OVERRIDE; - error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const - LLVM_OVERRIDE; + void moveSymbolNext(DataRefImpl &Symb) const override; + error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const override; + error_code getSymbolFileOffset(DataRefImpl Symb, + uint64_t &Res) const override; + error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const override; + error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const override; + error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const override; + uint32_t getSymbolFlags(DataRefImpl Symb) const override; + error_code getSymbolType(DataRefImpl Symb, + SymbolRef::Type &Res) const override; + error_code getSymbolSection(DataRefImpl Symb, + section_iterator &Res) const override; error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const; - error_code getLibraryNext(DataRefImpl Data, LibraryRef &Result) const - LLVM_OVERRIDE; - error_code getLibraryPath(DataRefImpl Data, StringRef &Res) const - LLVM_OVERRIDE; - - void moveSectionNext(DataRefImpl &Sec) const LLVM_OVERRIDE; - error_code getSectionName(DataRefImpl Sec, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const LLVM_OVERRIDE; + error_code getLibraryNext(DataRefImpl Data, + LibraryRef &Result) const override; + error_code getLibraryPath(DataRefImpl Data, StringRef &Res) const override; + + void moveSectionNext(DataRefImpl &Sec) const override; + error_code getSectionName(DataRefImpl Sec, StringRef &Res) const override; + error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const override; + error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const override; error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const; - error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code isSectionText(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; + error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const override; + error_code isSectionText(DataRefImpl Sec, bool &Res) const override; error_code isSectionData(DataRefImpl Sec, bool &Res) const; - error_code isSectionBSS(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionRequiredForExecution(DataRefImpl Sec, bool &Res) const - LLVM_OVERRIDE; + error_code isSectionBSS(DataRefImpl Sec, bool &Res) const override; + error_code isSectionRequiredForExecution(DataRefImpl Sec, + bool &Res) const override; error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const; - error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; + error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const override; error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const; error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb, - bool &Result) const LLVM_OVERRIDE; + bool &Result) const override; relocation_iterator section_rel_begin(DataRefImpl Sec) const; - relocation_iterator section_rel_end(DataRefImpl Sec) const LLVM_OVERRIDE; - section_iterator getRelocatedSection(DataRefImpl Sec) const LLVM_OVERRIDE; - - void moveRelocationNext(DataRefImpl &Rel) const LLVM_OVERRIDE; - error_code getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const LLVM_OVERRIDE; + relocation_iterator section_rel_end(DataRefImpl Sec) const override; + section_iterator getRelocatedSection(DataRefImpl Sec) const override; + + void moveRelocationNext(DataRefImpl &Rel) const override; + error_code getRelocationAddress(DataRefImpl Rel, + uint64_t &Res) const override; + error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const override; + symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; error_code getRelocationType(DataRefImpl Rel, uint64_t &Res) const; error_code getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; error_code getRelocationValueString(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; uint64_t getROffset(DataRefImpl Rel) const; StringRef getRelocationTypeName(uint32_t Type) const; @@ -180,27 +170,27 @@ public: const Elf_Sym *getSymbol(DataRefImpl Symb) const; - basic_symbol_iterator symbol_begin_impl() const LLVM_OVERRIDE; - basic_symbol_iterator symbol_end_impl() const LLVM_OVERRIDE; + basic_symbol_iterator symbol_begin_impl() const override; + basic_symbol_iterator symbol_end_impl() const override; symbol_iterator dynamic_symbol_begin() const; symbol_iterator dynamic_symbol_end() const; - section_iterator section_begin() const LLVM_OVERRIDE; - section_iterator section_end() const LLVM_OVERRIDE; + section_iterator section_begin() const override; + section_iterator section_end() const override; - library_iterator needed_library_begin() const LLVM_OVERRIDE; - library_iterator needed_library_end() const LLVM_OVERRIDE; + library_iterator needed_library_begin() const override; + library_iterator needed_library_end() const override; error_code getRelocationAddend(DataRefImpl Rel, int64_t &Res) const; error_code getSymbolVersion(SymbolRef Symb, StringRef &Version, bool &IsDefault) const; - uint8_t getBytesInAddress() const LLVM_OVERRIDE; - StringRef getFileFormatName() const LLVM_OVERRIDE; - unsigned getArch() const LLVM_OVERRIDE; - StringRef getLoadName() const LLVM_OVERRIDE; + uint8_t getBytesInAddress() const override; + StringRef getFileFormatName() const override; + unsigned getArch() const override; + StringRef getLoadName() const override; const ELFFile *getELFFile() const { return &EF; } diff --git a/include/llvm/Object/IRObjectFile.h b/include/llvm/Object/IRObjectFile.h index e85dd671032..5fcbb386d81 100644 --- a/include/llvm/Object/IRObjectFile.h +++ b/include/llvm/Object/IRObjectFile.h @@ -28,13 +28,12 @@ class IRObjectFile : public SymbolicFile { public: IRObjectFile(MemoryBuffer *Object, error_code &EC, LLVMContext &Context, bool BufferOwned); - void moveSymbolNext(DataRefImpl &Symb) const LLVM_OVERRIDE; - error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const - LLVM_OVERRIDE; - uint32_t getSymbolFlags(DataRefImpl Symb) const LLVM_OVERRIDE; + void moveSymbolNext(DataRefImpl &Symb) const override; + error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override; + uint32_t getSymbolFlags(DataRefImpl Symb) const override; const GlobalValue &getSymbolGV(DataRefImpl Symb) const; - basic_symbol_iterator symbol_begin_impl() const LLVM_OVERRIDE; - basic_symbol_iterator symbol_end_impl() const LLVM_OVERRIDE; + basic_symbol_iterator symbol_begin_impl() const override; + basic_symbol_iterator symbol_end_impl() const override; static inline bool classof(const Binary *v) { return v->isIR(); diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 4d6ef6d9a67..50296aed9b8 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -59,88 +59,73 @@ public: MachOObjectFile(MemoryBuffer *Object, bool IsLittleEndian, bool Is64Bits, error_code &EC, bool BufferOwned = true); - void moveSymbolNext(DataRefImpl &Symb) const LLVM_OVERRIDE; - error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolFileOffset(DataRefImpl Symb, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const - LLVM_OVERRIDE; - error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const LLVM_OVERRIDE; - error_code getSymbolType(DataRefImpl Symb, SymbolRef::Type &Res) const - LLVM_OVERRIDE; - uint32_t getSymbolFlags(DataRefImpl Symb) const LLVM_OVERRIDE; - error_code getSymbolSection(DataRefImpl Symb, section_iterator &Res) const - LLVM_OVERRIDE; - error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const - LLVM_OVERRIDE; - - void moveSectionNext(DataRefImpl &Sec) const LLVM_OVERRIDE; - error_code getSectionName(DataRefImpl Sec, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const LLVM_OVERRIDE; - error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const - LLVM_OVERRIDE; - error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const - LLVM_OVERRIDE; - error_code isSectionText(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionData(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionBSS(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionRequiredForExecution(DataRefImpl Sec, bool &Res) const - LLVM_OVERRIDE; - error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const LLVM_OVERRIDE; - error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const - LLVM_OVERRIDE; + void moveSymbolNext(DataRefImpl &Symb) const override; + error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const override; + error_code getSymbolAddress(DataRefImpl Symb, uint64_t &Res) const override; + error_code getSymbolFileOffset(DataRefImpl Symb, + uint64_t &Res) const override; + error_code getSymbolAlignment(DataRefImpl Symb, uint32_t &Res) const override; + error_code getSymbolSize(DataRefImpl Symb, uint64_t &Res) const override; + error_code getSymbolType(DataRefImpl Symb, + SymbolRef::Type &Res) const override; + uint32_t getSymbolFlags(DataRefImpl Symb) const override; + error_code getSymbolSection(DataRefImpl Symb, + section_iterator &Res) const override; + error_code getSymbolValue(DataRefImpl Symb, uint64_t &Val) const override; + + void moveSectionNext(DataRefImpl &Sec) const override; + error_code getSectionName(DataRefImpl Sec, StringRef &Res) const override; + error_code getSectionAddress(DataRefImpl Sec, uint64_t &Res) const override; + error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const override; + error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const override; + error_code getSectionAlignment(DataRefImpl Sec, uint64_t &Res) const override; + error_code isSectionText(DataRefImpl Sec, bool &Res) const override; + error_code isSectionData(DataRefImpl Sec, bool &Res) const override; + error_code isSectionBSS(DataRefImpl Sec, bool &Res) const override; + error_code isSectionRequiredForExecution(DataRefImpl Sec, + bool &Res) const override; + error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const override; + error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const override; + error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const override; error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb, - bool &Result) const LLVM_OVERRIDE; - relocation_iterator section_rel_begin(DataRefImpl Sec) const LLVM_OVERRIDE; - relocation_iterator section_rel_end(DataRefImpl Sec) const LLVM_OVERRIDE; - - void moveRelocationNext(DataRefImpl &Rel) const LLVM_OVERRIDE; - error_code getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const LLVM_OVERRIDE; - error_code getRelocationType(DataRefImpl Rel, uint64_t &Res) const - LLVM_OVERRIDE; + bool &Result) const override; + relocation_iterator section_rel_begin(DataRefImpl Sec) const override; + relocation_iterator section_rel_end(DataRefImpl Sec) const override; + + void moveRelocationNext(DataRefImpl &Rel) const override; + error_code getRelocationAddress(DataRefImpl Rel, + uint64_t &Res) const override; + error_code getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const override; + symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; + error_code getRelocationType(DataRefImpl Rel, uint64_t &Res) const override; error_code getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; error_code getRelocationValueString(DataRefImpl Rel, - SmallVectorImpl &Result) const - LLVM_OVERRIDE; - error_code getRelocationHidden(DataRefImpl Rel, bool &Result) const - LLVM_OVERRIDE; + SmallVectorImpl &Result) const override; + error_code getRelocationHidden(DataRefImpl Rel, bool &Result) const override; - error_code getLibraryNext(DataRefImpl LibData, LibraryRef &Res) const - LLVM_OVERRIDE; - error_code getLibraryPath(DataRefImpl LibData, StringRef &Res) const - LLVM_OVERRIDE; + error_code getLibraryNext(DataRefImpl LibData, + LibraryRef &Res) const override; + error_code getLibraryPath(DataRefImpl LibData, StringRef &Res) const override; // TODO: Would be useful to have an iterator based version // of the load command interface too. - basic_symbol_iterator symbol_begin_impl() const LLVM_OVERRIDE; - basic_symbol_iterator symbol_end_impl() const LLVM_OVERRIDE; + basic_symbol_iterator symbol_begin_impl() const override; + basic_symbol_iterator symbol_end_impl() const override; - section_iterator section_begin() const LLVM_OVERRIDE; - section_iterator section_end() const LLVM_OVERRIDE; + section_iterator section_begin() const override; + section_iterator section_end() const override; - library_iterator needed_library_begin() const LLVM_OVERRIDE; - library_iterator needed_library_end() const LLVM_OVERRIDE; + library_iterator needed_library_begin() const override; + library_iterator needed_library_end() const override; - uint8_t getBytesInAddress() const LLVM_OVERRIDE; + uint8_t getBytesInAddress() const override; - StringRef getFileFormatName() const LLVM_OVERRIDE; - unsigned getArch() const LLVM_OVERRIDE; + StringRef getFileFormatName() const override; + unsigned getArch() const override; - StringRef getLoadName() const LLVM_OVERRIDE; + StringRef getLoadName() const override; relocation_iterator section_rel_begin(unsigned Index) const; relocation_iterator section_rel_end(unsigned Index) const; diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 397f50fbe36..371d2d9561f 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -79,8 +79,8 @@ class MallocSlabAllocator : public SlabAllocator { public: MallocSlabAllocator() : Allocator() { } virtual ~MallocSlabAllocator(); - virtual MemSlab *Allocate(size_t Size) LLVM_OVERRIDE; - virtual void Deallocate(MemSlab *Slab) LLVM_OVERRIDE; + virtual MemSlab *Allocate(size_t Size) override; + virtual void Deallocate(MemSlab *Slab) override; }; /// BumpPtrAllocator - This allocator is useful for containers that need diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 8d84f3f6dfe..0267db817a4 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1641,18 +1641,18 @@ public: class alias : public Option { Option *AliasFor; virtual bool handleOccurrence(unsigned pos, StringRef /*ArgName*/, - StringRef Arg) LLVM_OVERRIDE { + StringRef Arg) override { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } // Handle printing stuff... - virtual size_t getOptionWidth() const LLVM_OVERRIDE; - virtual void printOptionInfo(size_t GlobalWidth) const LLVM_OVERRIDE; + virtual size_t getOptionWidth() const override; + virtual void printOptionInfo(size_t GlobalWidth) const override; // Aliases do not need to print their values. virtual void printOptionValue(size_t /*GlobalWidth*/, - bool /*Force*/) const LLVM_OVERRIDE {} + bool /*Force*/) const override {} - virtual ValueExpected getValueExpectedFlagDefault() const LLVM_OVERRIDE { + virtual ValueExpected getValueExpectedFlagDefault() const override { return AliasFor->getValueExpectedFlag(); } diff --git a/include/llvm/Support/FormattedStream.h b/include/llvm/Support/FormattedStream.h index df1f2183e6c..542e2a7d8db 100644 --- a/include/llvm/Support/FormattedStream.h +++ b/include/llvm/Support/FormattedStream.h @@ -57,11 +57,11 @@ private: /// const char *Scanned; - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, /// not counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE { + virtual uint64_t current_pos() const override { // Our current position in the stream is all the contents which have been // written to the underlying stream (*not* the current position of the // underlying stream). diff --git a/include/llvm/Support/PrettyStackTrace.h b/include/llvm/Support/PrettyStackTrace.h index 4f68fca24f3..87ad155a0b4 100644 --- a/include/llvm/Support/PrettyStackTrace.h +++ b/include/llvm/Support/PrettyStackTrace.h @@ -50,7 +50,7 @@ namespace llvm { const char *Str; public: PrettyStackTraceString(const char *str) : Str(str) {} - virtual void print(raw_ostream &OS) const LLVM_OVERRIDE; + virtual void print(raw_ostream &OS) const override; }; /// PrettyStackTraceProgram - This object prints a specified program arguments @@ -63,7 +63,7 @@ namespace llvm { : ArgC(argc), ArgV(argv) { EnablePrettyStackTrace(); } - virtual void print(raw_ostream &OS) const LLVM_OVERRIDE; + virtual void print(raw_ostream &OS) const override; }; } // end namespace llvm diff --git a/include/llvm/Support/StreamableMemoryObject.h b/include/llvm/Support/StreamableMemoryObject.h index e823d489d3a..1eb4c32dbc4 100644 --- a/include/llvm/Support/StreamableMemoryObject.h +++ b/include/llvm/Support/StreamableMemoryObject.h @@ -38,7 +38,7 @@ class StreamableMemoryObject : public MemoryObject { /// getBase - Returns the lowest valid address in the region. /// /// @result - The lowest valid address. - virtual uint64_t getBase() const LLVM_OVERRIDE = 0; + virtual uint64_t getBase() const override = 0; /// getExtent - Returns the size of the region in bytes. (The region is /// contiguous, so the highest valid address of the region @@ -46,7 +46,7 @@ class StreamableMemoryObject : public MemoryObject { /// May block until all bytes in the stream have been read /// /// @result - The size of the region. - virtual uint64_t getExtent() const LLVM_OVERRIDE = 0; + virtual uint64_t getExtent() const override = 0; /// readByte - Tries to read a single byte from the region. /// May block until (address - base) bytes have been read @@ -54,7 +54,7 @@ class StreamableMemoryObject : public MemoryObject { /// @param ptr - A pointer to a byte to be filled in. Must be non-NULL. /// @result - 0 if successful; -1 if not. Failure may be due to a /// bounds violation or an implementation-specific error. - virtual int readByte(uint64_t address, uint8_t *ptr) const LLVM_OVERRIDE = 0; + virtual int readByte(uint64_t address, uint8_t *ptr) const override = 0; /// readBytes - Tries to read a contiguous range of bytes from the /// region, up to the end of the region. @@ -72,7 +72,7 @@ class StreamableMemoryObject : public MemoryObject { /// bounds violation or an implementation-specific error. virtual int readBytes(uint64_t address, uint64_t size, - uint8_t *buf) const LLVM_OVERRIDE = 0; + uint8_t *buf) const override = 0; /// getPointer - Ensures that the requested data is in memory, and returns /// A pointer to it. More efficient than using readBytes if the @@ -105,14 +105,14 @@ class StreamableMemoryObject : public MemoryObject { class StreamingMemoryObject : public StreamableMemoryObject { public: StreamingMemoryObject(DataStreamer *streamer); - virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; } - virtual uint64_t getExtent() const LLVM_OVERRIDE; - virtual int readByte(uint64_t address, uint8_t *ptr) const LLVM_OVERRIDE; + virtual uint64_t getBase() const override { return 0; } + virtual uint64_t getExtent() const override; + virtual int readByte(uint64_t address, uint8_t *ptr) const override; virtual int readBytes(uint64_t address, uint64_t size, - uint8_t *buf) const LLVM_OVERRIDE; + uint8_t *buf) const override; virtual const uint8_t *getPointer(uint64_t address, - uint64_t size) const LLVM_OVERRIDE { + uint64_t size) const override { // This could be fixed by ensuring the bytes are fetched and making a copy, // requiring that the bitcode size be known, or otherwise ensuring that // the memory doesn't go away/get reallocated, but it's @@ -120,8 +120,8 @@ public: assert(0 && "getPointer in streaming memory objects not allowed"); return NULL; } - virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE; - virtual bool isObjectEnd(uint64_t address) const LLVM_OVERRIDE; + virtual bool isValidAddress(uint64_t address) const override; + virtual bool isObjectEnd(uint64_t address) const override; /// Drop s bytes from the front of the stream, pushing the positions of the /// remaining bytes down by s. This is used to skip past the bitcode header, diff --git a/include/llvm/Support/StringRefMemoryObject.h b/include/llvm/Support/StringRefMemoryObject.h index 994fa34b74b..8a349eab84c 100644 --- a/include/llvm/Support/StringRefMemoryObject.h +++ b/include/llvm/Support/StringRefMemoryObject.h @@ -29,11 +29,11 @@ public: StringRefMemoryObject(StringRef Bytes, uint64_t Base = 0) : Bytes(Bytes), Base(Base) {} - uint64_t getBase() const LLVM_OVERRIDE { return Base; } - uint64_t getExtent() const LLVM_OVERRIDE { return Bytes.size(); } + uint64_t getBase() const override { return Base; } + uint64_t getExtent() const override { return Bytes.size(); } - int readByte(uint64_t Addr, uint8_t *Byte) const LLVM_OVERRIDE; - int readBytes(uint64_t Addr, uint64_t Size, uint8_t *Buf) const LLVM_OVERRIDE; + int readByte(uint64_t Addr, uint8_t *Byte) const override; + int readBytes(uint64_t Addr, uint64_t Size, uint8_t *Buf) const override; }; } diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h index 4180735ed3b..a68e8ab5bfe 100644 --- a/include/llvm/Support/YAMLParser.h +++ b/include/llvm/Support/YAMLParser.h @@ -255,7 +255,7 @@ public: /// @returns The value, or nullptr if failed() == true. Node *getValue(); - virtual void skip() LLVM_OVERRIDE { + virtual void skip() override { getKey()->skip(); getValue()->skip(); } @@ -369,7 +369,7 @@ public: iterator end() { return iterator(); } - virtual void skip() LLVM_OVERRIDE { + virtual void skip() override { yaml::skip(*this); } @@ -430,7 +430,7 @@ public: iterator end() { return iterator(); } - virtual void skip() LLVM_OVERRIDE { + virtual void skip() override { yaml::skip(*this); } diff --git a/include/llvm/Support/circular_raw_ostream.h b/include/llvm/Support/circular_raw_ostream.h index 90003068572..d7f5395dd85 100644 --- a/include/llvm/Support/circular_raw_ostream.h +++ b/include/llvm/Support/circular_raw_ostream.h @@ -81,12 +81,12 @@ namespace llvm Filled = false; } - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, /// not counting the bytes currently in the buffer. /// - virtual uint64_t current_pos() const LLVM_OVERRIDE { + virtual uint64_t current_pos() const override { // This has the same effect as calling TheStream.current_pos(), // but that interface is private. return TheStream->tell() - TheStream->GetNumBytesInBuffer(); diff --git a/include/llvm/Support/raw_os_ostream.h b/include/llvm/Support/raw_os_ostream.h index 4385721e820..9bfce437f77 100644 --- a/include/llvm/Support/raw_os_ostream.h +++ b/include/llvm/Support/raw_os_ostream.h @@ -26,11 +26,11 @@ class raw_os_ostream : public raw_ostream { std::ostream &OS; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE; + virtual uint64_t current_pos() const override; public: raw_os_ostream(std::ostream &O) : OS(O) {} diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index e0048f51408..6c91f5870b5 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -322,14 +322,14 @@ class raw_fd_ostream : public raw_ostream { uint64_t pos; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE { return pos; } + virtual uint64_t current_pos() const override { return pos; } /// preferred_buffer_size - Determine an efficient buffer size. - virtual size_t preferred_buffer_size() const LLVM_OVERRIDE; + virtual size_t preferred_buffer_size() const override; /// error_detected - Set the flag indicating that an output error has /// been encountered. @@ -374,14 +374,14 @@ public: } virtual raw_ostream &changeColor(enum Colors colors, bool bold=false, - bool bg=false) LLVM_OVERRIDE; - virtual raw_ostream &resetColor() LLVM_OVERRIDE; + bool bg=false) override; + virtual raw_ostream &resetColor() override; - virtual raw_ostream &reverseColor() LLVM_OVERRIDE; + virtual raw_ostream &reverseColor() override; - virtual bool is_displayed() const LLVM_OVERRIDE; + virtual bool is_displayed() const override; - virtual bool has_colors() const LLVM_OVERRIDE; + virtual bool has_colors() const override; /// has_error - Return the value of the flag in this raw_fd_ostream indicating /// whether an output error has been encountered. @@ -427,11 +427,11 @@ class raw_string_ostream : public raw_ostream { std::string &OS; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE { return OS.size(); } + virtual uint64_t current_pos() const override { return OS.size(); } public: explicit raw_string_ostream(std::string &O) : OS(O) {} ~raw_string_ostream(); @@ -451,11 +451,11 @@ class raw_svector_ostream : public raw_ostream { SmallVectorImpl &OS; /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t Size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t Size) override; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE; + virtual uint64_t current_pos() const override; public: /// Construct a new raw_svector_ostream. /// @@ -477,11 +477,11 @@ public: /// raw_null_ostream - A raw_ostream that discards all output. class raw_null_ostream : public raw_ostream { /// write_impl - See raw_ostream::write_impl. - virtual void write_impl(const char *Ptr, size_t size) LLVM_OVERRIDE; + virtual void write_impl(const char *Ptr, size_t size) override; /// current_pos - Return the current position within the stream, not /// counting the bytes currently in the buffer. - virtual uint64_t current_pos() const LLVM_OVERRIDE; + virtual uint64_t current_pos() const override; public: explicit raw_null_ostream() {} diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index 43dace6ab81..97226cc179e 100644 --- a/include/llvm/Support/system_error.h +++ b/include/llvm/Support/system_error.h @@ -653,7 +653,7 @@ public: class _do_message : public error_category { public: - virtual std::string message(int ev) const LLVM_OVERRIDE; + virtual std::string message(int ev) const override; }; const error_category& generic_category(); diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp index 8a680107ff9..3bc27c79048 100644 --- a/lib/Analysis/TargetTransformInfo.cpp +++ b/lib/Analysis/TargetTransformInfo.cpp @@ -248,7 +248,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { initializeNoTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { // Note that this subclass is special, and must *not* call initializeTTI as // it does not chain. TopTTI = this; @@ -257,7 +257,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { DL = DLP ? &DLP->getDataLayout() : 0; } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { // Note that this subclass is special, and must *not* call // TTI::getAnalysisUsage as it breaks the recursion. } @@ -266,14 +266,14 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; } unsigned getOperationCost(unsigned Opcode, Type *Ty, - Type *OpTy) const LLVM_OVERRIDE { + Type *OpTy) const override { switch (Opcode) { default: // By default, just classify everything as 'basic'. @@ -330,7 +330,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { } unsigned getGEPCost(const Value *Ptr, - ArrayRef Operands) const LLVM_OVERRIDE { + ArrayRef Operands) const override { // In the basic model, we just assume that all-constant GEPs will be folded // into their uses via addressing modes. for (unsigned Idx = 0, Size = Operands.size(); Idx != Size; ++Idx) @@ -340,7 +340,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { return TCC_Free; } - unsigned getCallCost(FunctionType *FTy, int NumArgs = -1) const LLVM_OVERRIDE + unsigned getCallCost(FunctionType *FTy, int NumArgs = -1) const override { assert(FTy && "FunctionType must be provided to this routine."); @@ -356,7 +356,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { return TCC_Basic * (NumArgs + 1); } - unsigned getCallCost(const Function *F, int NumArgs = -1) const LLVM_OVERRIDE + unsigned getCallCost(const Function *F, int NumArgs = -1) const override { assert(F && "A concrete function must be provided to this routine."); @@ -378,7 +378,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { } unsigned getCallCost(const Function *F, - ArrayRef Arguments) const LLVM_OVERRIDE { + ArrayRef Arguments) const override { // Simply delegate to generic handling of the call. // FIXME: We should use instsimplify or something else to catch calls which // will constant fold with these arguments. @@ -386,7 +386,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { } unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) const LLVM_OVERRIDE { + ArrayRef ParamTys) const override { switch (IID) { default: // Intrinsics rarely (if ever) have normal argument setup constraints. @@ -410,7 +410,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) const LLVM_OVERRIDE { + ArrayRef Arguments) const override { // Delegate to the generic intrinsic handling code. This mostly provides an // opportunity for targets to (for example) special case the cost of // certain intrinsics based on constants used as arguments. @@ -421,7 +421,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { return TopTTI->getIntrinsicCost(IID, RetTy, ParamTys); } - unsigned getUserCost(const User *U) const LLVM_OVERRIDE { + unsigned getUserCost(const User *U) const override { if (isa(U)) return TCC_Free; // Model all PHI nodes as free. @@ -456,9 +456,9 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { U->getOperand(0)->getType() : 0); } - bool hasBranchDivergence() const LLVM_OVERRIDE { return false; } + bool hasBranchDivergence() const override { return false; } - bool isLoweredToCall(const Function *F) const LLVM_OVERRIDE { + bool isLoweredToCall(const Function *F) const override { // FIXME: These should almost certainly not be handled here, and instead // handled with the help of TLI or the target itself. This was largely // ported from existing analysis heuristics here so that such refactorings @@ -489,20 +489,19 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { return true; } - void getUnrollingPreferences(Loop *, - UnrollingPreferences &) const LLVM_OVERRIDE - { } + void getUnrollingPreferences(Loop *, UnrollingPreferences &) const override { + } - bool isLegalAddImmediate(int64_t Imm) const LLVM_OVERRIDE { + bool isLegalAddImmediate(int64_t Imm) const override { return false; } - bool isLegalICmpImmediate(int64_t Imm) const LLVM_OVERRIDE { + bool isLegalICmpImmediate(int64_t Imm) const override { return false; } bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale) const LLVM_OVERRIDE + bool HasBaseReg, int64_t Scale) const override { // Guess that reg+reg addressing is allowed. This heuristic is taken from // the implementation of LSR. @@ -510,119 +509,116 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo { } int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale) const LLVM_OVERRIDE { + bool HasBaseReg, int64_t Scale) const override { // Guess that all legal addressing mode are free. if(isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg, Scale)) return 0; return -1; } - bool isTruncateFree(Type *Ty1, Type *Ty2) const LLVM_OVERRIDE { + bool isTruncateFree(Type *Ty1, Type *Ty2) const override { return false; } - bool isTypeLegal(Type *Ty) const LLVM_OVERRIDE { + bool isTypeLegal(Type *Ty) const override { return false; } - unsigned getJumpBufAlignment() const LLVM_OVERRIDE { + unsigned getJumpBufAlignment() const override { return 0; } - unsigned getJumpBufSize() const LLVM_OVERRIDE { + unsigned getJumpBufSize() const override { return 0; } - bool shouldBuildLookupTables() const LLVM_OVERRIDE { + bool shouldBuildLookupTables() const override { return true; } PopcntSupportKind - getPopcntSupport(unsigned IntTyWidthInBit) const LLVM_OVERRIDE { + getPopcntSupport(unsigned IntTyWidthInBit) const override { return PSK_Software; } - bool haveFastSqrt(Type *Ty) const LLVM_OVERRIDE { + bool haveFastSqrt(Type *Ty) const override { return false; } - unsigned getIntImmCost(const APInt &Imm, Type *Ty) const LLVM_OVERRIDE { + unsigned getIntImmCost(const APInt &Imm, Type *Ty) const override { return TCC_Basic; } unsigned getIntImmCost(unsigned Opcode, const APInt &Imm, - Type *Ty) const LLVM_OVERRIDE { + Type *Ty) const override { return TCC_Free; } unsigned getIntImmCost(Intrinsic::ID IID, const APInt &Imm, - Type *Ty) const LLVM_OVERRIDE { + Type *Ty) const override { return TCC_Free; } - unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE { + unsigned getNumberOfRegisters(bool Vector) const override { return 8; } - unsigned getRegisterBitWidth(bool Vector) const LLVM_OVERRIDE { + unsigned getRegisterBitWidth(bool Vector) const override { return 32; } - unsigned getMaximumUnrollFactor() const LLVM_OVERRIDE { + unsigned getMaximumUnrollFactor() const override { return 1; } unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind, - OperandValueKind) const LLVM_OVERRIDE { + OperandValueKind) const override { return 1; } unsigned getShuffleCost(ShuffleKind Kind, Type *Ty, - int Index = 0, Type *SubTp = 0) const LLVM_OVERRIDE { + int Index = 0, Type *SubTp = 0) const override { return 1; } unsigned getCastInstrCost(unsigned Opcode, Type *Dst, - Type *Src) const LLVM_OVERRIDE { + Type *Src) const override { return 1; } - unsigned getCFInstrCost(unsigned Opcode) const LLVM_OVERRIDE { + unsigned getCFInstrCost(unsigned Opcode) const override { return 1; } unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy = 0) const LLVM_OVERRIDE { + Type *CondTy = 0) const override { return 1; } unsigned getVectorInstrCost(unsigned Opcode, Type *Val, - unsigned Index = -1) const LLVM_OVERRIDE { + unsigned Index = -1) const override { return 1; } - unsigned getMemoryOpCost(unsigned Opcode, - Type *Src, - unsigned Alignment, - unsigned AddressSpace) const LLVM_OVERRIDE { + unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, + unsigned AddressSpace) const override { return 1; } - unsigned getIntrinsicInstrCost(Intrinsic::ID ID, - Type *RetTy, - ArrayRef Tys) const LLVM_OVERRIDE { + unsigned getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, + ArrayRef Tys) const override { return 1; } - unsigned getNumberOfParts(Type *Tp) const LLVM_OVERRIDE { + unsigned getNumberOfParts(Type *Tp) const override { return 0; } - unsigned getAddressComputationCost(Type *Tp, bool) const LLVM_OVERRIDE { + unsigned getAddressComputationCost(Type *Tp, bool) const override { return 0; } - unsigned getReductionCost(unsigned, Type *, bool) const LLVM_OVERRIDE { + unsigned getReductionCost(unsigned, Type *, bool) const override { return 1; } }; diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index dd2f40f3903..0992997d780 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3246,10 +3246,10 @@ error_code BitcodeReader::InitLazyStream() { namespace { class BitcodeErrorCategoryType : public _do_message { - const char *name() const LLVM_OVERRIDE { + const char *name() const override { return "llvm.bitcode"; } - std::string message(int IE) const LLVM_OVERRIDE { + std::string message(int IE) const override { BitcodeReader::ErrorType E = static_cast(IE); switch (E) { case BitcodeReader::BitcodeStreamInvalidSize: diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index f92b0852c81..c87f2bd15d4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -573,7 +573,7 @@ public: /// either DW_FORM_addr or DW_FORM_GNU_addr_index. void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label); - DwarfCompileUnit &getCU() LLVM_OVERRIDE { return *this; } + DwarfCompileUnit &getCU() override { return *this; } }; class DwarfTypeUnit : public DwarfUnit { @@ -592,13 +592,13 @@ public: /// Emit the header for this unit, not including the initial length field. void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const - LLVM_OVERRIDE; - unsigned getHeaderSize() const LLVM_OVERRIDE { + override; + unsigned getHeaderSize() const override { return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature sizeof(uint32_t); // Type DIE Offset } void initSection(const MCSection *Section); - DwarfCompileUnit &getCU() LLVM_OVERRIDE { return CU; } + DwarfCompileUnit &getCU() override { return CU; } }; } // end llvm namespace #endif diff --git a/lib/CodeGen/BasicTargetTransformInfo.cpp b/lib/CodeGen/BasicTargetTransformInfo.cpp index c12a90d1f7c..003f4c4c9e8 100644 --- a/lib/CodeGen/BasicTargetTransformInfo.cpp +++ b/lib/CodeGen/BasicTargetTransformInfo.cpp @@ -43,7 +43,7 @@ public: initializeBasicTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -51,7 +51,7 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -59,64 +59,64 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; } - virtual bool hasBranchDivergence() const LLVM_OVERRIDE; + virtual bool hasBranchDivergence() const override; /// \name Scalar TTI Implementations /// @{ - virtual bool isLegalAddImmediate(int64_t imm) const LLVM_OVERRIDE; - virtual bool isLegalICmpImmediate(int64_t imm) const LLVM_OVERRIDE; + virtual bool isLegalAddImmediate(int64_t imm) const override; + virtual bool isLegalICmpImmediate(int64_t imm) const override; virtual bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, - int64_t Scale) const LLVM_OVERRIDE; + int64_t Scale) const override; virtual int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, - int64_t Scale) const LLVM_OVERRIDE; - virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const LLVM_OVERRIDE; - virtual bool isTypeLegal(Type *Ty) const LLVM_OVERRIDE; - virtual unsigned getJumpBufAlignment() const LLVM_OVERRIDE; - virtual unsigned getJumpBufSize() const LLVM_OVERRIDE; - virtual bool shouldBuildLookupTables() const LLVM_OVERRIDE; - virtual bool haveFastSqrt(Type *Ty) const LLVM_OVERRIDE; + int64_t Scale) const override; + virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const override; + virtual bool isTypeLegal(Type *Ty) const override; + virtual unsigned getJumpBufAlignment() const override; + virtual unsigned getJumpBufSize() const override; + virtual bool shouldBuildLookupTables() const override; + virtual bool haveFastSqrt(Type *Ty) const override; virtual void getUnrollingPreferences( - Loop *L, UnrollingPreferences &UP) const LLVM_OVERRIDE; + Loop *L, UnrollingPreferences &UP) const override; /// @} /// \name Vector TTI Implementations /// @{ - virtual unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE; - virtual unsigned getMaximumUnrollFactor() const LLVM_OVERRIDE; - virtual unsigned getRegisterBitWidth(bool Vector) const LLVM_OVERRIDE; + virtual unsigned getNumberOfRegisters(bool Vector) const override; + virtual unsigned getMaximumUnrollFactor() const override; + virtual unsigned getRegisterBitWidth(bool Vector) const override; virtual unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind, - OperandValueKind) const LLVM_OVERRIDE; + OperandValueKind) const override; virtual unsigned getShuffleCost(ShuffleKind Kind, Type *Tp, - int Index, Type *SubTp) const LLVM_OVERRIDE; + int Index, Type *SubTp) const override; virtual unsigned getCastInstrCost(unsigned Opcode, Type *Dst, - Type *Src) const LLVM_OVERRIDE; - virtual unsigned getCFInstrCost(unsigned Opcode) const LLVM_OVERRIDE; + Type *Src) const override; + virtual unsigned getCFInstrCost(unsigned Opcode) const override; virtual unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy) const LLVM_OVERRIDE; + Type *CondTy) const override; virtual unsigned getVectorInstrCost(unsigned Opcode, Type *Val, - unsigned Index) const LLVM_OVERRIDE; + unsigned Index) const override; virtual unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) const LLVM_OVERRIDE; + unsigned AddressSpace) const override; virtual unsigned getIntrinsicInstrCost( - Intrinsic::ID, Type *RetTy, ArrayRef Tys) const LLVM_OVERRIDE; - virtual unsigned getNumberOfParts(Type *Tp) const LLVM_OVERRIDE; + Intrinsic::ID, Type *RetTy, ArrayRef Tys) const override; + virtual unsigned getNumberOfParts(Type *Tp) const override; virtual unsigned getAddressComputationCost( - Type *Ty, bool IsComplex) const LLVM_OVERRIDE; + Type *Ty, bool IsComplex) const override; virtual unsigned getReductionCost(unsigned Opcode, Type *Ty, - bool IsPairwise) const LLVM_OVERRIDE; + bool IsPairwise) const override; /// @} }; diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp index beb724342ee..f10a471d66f 100644 --- a/lib/CodeGen/MachineScheduler.cpp +++ b/lib/CodeGen/MachineScheduler.cpp @@ -2454,27 +2454,27 @@ public: virtual void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, - unsigned NumRegionInstrs) LLVM_OVERRIDE; + unsigned NumRegionInstrs) override; - virtual bool shouldTrackPressure() const LLVM_OVERRIDE { + virtual bool shouldTrackPressure() const override { return RegionPolicy.ShouldTrackPressure; } - virtual void initialize(ScheduleDAGMI *dag) LLVM_OVERRIDE; + virtual void initialize(ScheduleDAGMI *dag) override; - virtual SUnit *pickNode(bool &IsTopNode) LLVM_OVERRIDE; + virtual SUnit *pickNode(bool &IsTopNode) override; - virtual void schedNode(SUnit *SU, bool IsTopNode) LLVM_OVERRIDE; + virtual void schedNode(SUnit *SU, bool IsTopNode) override; - virtual void releaseTopNode(SUnit *SU) LLVM_OVERRIDE { + virtual void releaseTopNode(SUnit *SU) override { Top.releaseTopNode(SU); } - virtual void releaseBottomNode(SUnit *SU) LLVM_OVERRIDE { + virtual void releaseBottomNode(SUnit *SU) override { Bot.releaseBottomNode(SU); } - virtual void registerRoots() LLVM_OVERRIDE; + virtual void registerRoots() override; protected: void checkAcyclicLatency(); @@ -3047,14 +3047,14 @@ public: virtual void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, - unsigned NumRegionInstrs) LLVM_OVERRIDE { + unsigned NumRegionInstrs) override { /* no configurable policy */ }; /// PostRA scheduling does not track pressure. - virtual bool shouldTrackPressure() const LLVM_OVERRIDE { return false; } + virtual bool shouldTrackPressure() const override { return false; } - virtual void initialize(ScheduleDAGMI *Dag) LLVM_OVERRIDE { + virtual void initialize(ScheduleDAGMI *Dag) override { DAG = Dag; SchedModel = DAG->getSchedModel(); TRI = DAG->TRI; @@ -3073,22 +3073,22 @@ public: } } - virtual void registerRoots() LLVM_OVERRIDE; + virtual void registerRoots() override; - virtual SUnit *pickNode(bool &IsTopNode) LLVM_OVERRIDE; + virtual SUnit *pickNode(bool &IsTopNode) override; - virtual void scheduleTree(unsigned SubtreeID) LLVM_OVERRIDE { + virtual void scheduleTree(unsigned SubtreeID) override { llvm_unreachable("PostRA scheduler does not support subtree analysis."); } - virtual void schedNode(SUnit *SU, bool IsTopNode) LLVM_OVERRIDE; + virtual void schedNode(SUnit *SU, bool IsTopNode) override; - virtual void releaseTopNode(SUnit *SU) LLVM_OVERRIDE { + virtual void releaseTopNode(SUnit *SU) override { Top.releaseTopNode(SU); } // Only called for roots. - virtual void releaseBottomNode(SUnit *SU) LLVM_OVERRIDE { + virtual void releaseBottomNode(SUnit *SU) override { BotRoots.push_back(SU); } diff --git a/lib/DebugInfo/DWARFCompileUnit.h b/lib/DebugInfo/DWARFCompileUnit.h index 1c9573b0b4b..d1853d80a38 100644 --- a/lib/DebugInfo/DWARFCompileUnit.h +++ b/lib/DebugInfo/DWARFCompileUnit.h @@ -22,7 +22,7 @@ public: : DWARFUnit(DA, IS, AS, RS, SS, SOS, AOS, M, LE) {} void dump(raw_ostream &OS); // VTable anchor. - ~DWARFCompileUnit() LLVM_OVERRIDE; + ~DWARFCompileUnit() override; }; } diff --git a/lib/DebugInfo/DWARFTypeUnit.h b/lib/DebugInfo/DWARFTypeUnit.h index 7a0dab204d0..05e13ff1048 100644 --- a/lib/DebugInfo/DWARFTypeUnit.h +++ b/lib/DebugInfo/DWARFTypeUnit.h @@ -23,10 +23,10 @@ public: StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, const RelocAddrMap *M, bool LE) : DWARFUnit(DA, IS, AS, RS, SS, SOS, AOS, M, LE) {} - uint32_t getSize() const LLVM_OVERRIDE { return DWARFUnit::getSize() + 12; } + uint32_t getSize() const override { return DWARFUnit::getSize() + 12; } void dump(raw_ostream &OS); protected: - bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) LLVM_OVERRIDE; + bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override; }; } diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index c86224b36f8..31f5de56d74 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -114,7 +114,7 @@ public: return CommentStream; } - void emitRawComment(const Twine &T, bool TabPrefix = true) LLVM_OVERRIDE; + void emitRawComment(const Twine &T, bool TabPrefix = true) override; /// AddBlankLine - Emit a blank line to a .s file to pretty it up. virtual void AddBlankLine() { diff --git a/lib/MC/MCObjectSymbolizer.cpp b/lib/MC/MCObjectSymbolizer.cpp index ee0b81ed15f..7653fece419 100644 --- a/lib/MC/MCObjectSymbolizer.cpp +++ b/lib/MC/MCObjectSymbolizer.cpp @@ -37,11 +37,10 @@ public: MCMachObjectSymbolizer(MCContext &Ctx, OwningPtr &RelInfo, const MachOObjectFile *MOOF); - StringRef findExternalFunctionAt(uint64_t Addr) LLVM_OVERRIDE; + StringRef findExternalFunctionAt(uint64_t Addr) override; - void tryAddingPcLoadReferenceComment(raw_ostream &cStream, - int64_t Value, - uint64_t Address) LLVM_OVERRIDE; + void tryAddingPcLoadReferenceComment(raw_ostream &cStream, int64_t Value, + uint64_t Address) override; }; } // End unnamed namespace diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index e94206ee3d7..6d962e6496f 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -689,7 +689,7 @@ namespace { free(Dup); } } - const char *SaveString(const char *Str) LLVM_OVERRIDE { + const char *SaveString(const char *Str) override { char *Dup = strdup(Str); Dups.push_back(Dup); return Dup; diff --git a/lib/Support/DAGDeltaAlgorithm.cpp b/lib/Support/DAGDeltaAlgorithm.cpp index 34e82cf4416..7b81a113514 100644 --- a/lib/Support/DAGDeltaAlgorithm.cpp +++ b/lib/Support/DAGDeltaAlgorithm.cpp @@ -163,11 +163,11 @@ class DeltaActiveSetHelper : public DeltaAlgorithm { protected: /// UpdatedSearchState - Callback used when the search state changes. virtual void UpdatedSearchState(const changeset_ty &Changes, - const changesetlist_ty &Sets) LLVM_OVERRIDE { + const changesetlist_ty &Sets) override { DDAI.UpdatedSearchState(Changes, Sets, Required); } - virtual bool ExecuteOneTest(const changeset_ty &S) LLVM_OVERRIDE { + virtual bool ExecuteOneTest(const changeset_ty &S) override { return DDAI.GetTestResult(S, Required); } diff --git a/lib/Support/DataStream.cpp b/lib/Support/DataStream.cpp index 0bd0c687021..d02b83cb923 100644 --- a/lib/Support/DataStream.cpp +++ b/lib/Support/DataStream.cpp @@ -58,7 +58,7 @@ public: virtual ~DataFileStreamer() { close(Fd); } - virtual size_t GetBytes(unsigned char *buf, size_t len) LLVM_OVERRIDE { + virtual size_t GetBytes(unsigned char *buf, size_t len) override { NumStreamFetches++; return read(Fd, buf, len); } diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp index 33beba7792c..ecae7695e1f 100644 --- a/lib/Support/MemoryBuffer.cpp +++ b/lib/Support/MemoryBuffer.cpp @@ -91,12 +91,12 @@ public: init(InputData.begin(), InputData.end(), RequiresNullTerminator); } - virtual const char *getBufferIdentifier() const LLVM_OVERRIDE { + virtual const char *getBufferIdentifier() const override { // The name is stored after the class itself. return reinterpret_cast(this + 1); } - virtual BufferKind getBufferKind() const LLVM_OVERRIDE { + virtual BufferKind getBufferKind() const override { return MemoryBuffer_Malloc; } }; @@ -207,12 +207,12 @@ public: } } - virtual const char *getBufferIdentifier() const LLVM_OVERRIDE { + virtual const char *getBufferIdentifier() const override { // The name is stored after the class itself. return reinterpret_cast(this + 1); } - virtual BufferKind getBufferKind() const LLVM_OVERRIDE { + virtual BufferKind getBufferKind() const override { return MemoryBuffer_MMap; } }; diff --git a/lib/Support/StreamableMemoryObject.cpp b/lib/Support/StreamableMemoryObject.cpp index 2ed7c5c100a..2cc87fc1abe 100644 --- a/lib/Support/StreamableMemoryObject.cpp +++ b/lib/Support/StreamableMemoryObject.cpp @@ -24,20 +24,20 @@ public: assert(LastChar >= FirstChar && "Invalid start/end range"); } - virtual uint64_t getBase() const LLVM_OVERRIDE { return 0; } - virtual uint64_t getExtent() const LLVM_OVERRIDE { + virtual uint64_t getBase() const override { return 0; } + virtual uint64_t getExtent() const override { return LastChar - FirstChar; } - virtual int readByte(uint64_t address, uint8_t* ptr) const LLVM_OVERRIDE; + virtual int readByte(uint64_t address, uint8_t* ptr) const override; virtual int readBytes(uint64_t address, uint64_t size, - uint8_t *buf) const LLVM_OVERRIDE; + uint8_t *buf) const override; virtual const uint8_t *getPointer(uint64_t address, - uint64_t size) const LLVM_OVERRIDE; - virtual bool isValidAddress(uint64_t address) const LLVM_OVERRIDE { + uint64_t size) const override; + virtual bool isValidAddress(uint64_t address) const override { return validAddress(address); } - virtual bool isObjectEnd(uint64_t address) const LLVM_OVERRIDE { + virtual bool isObjectEnd(uint64_t address) const override { return objectEnd(address); } diff --git a/lib/Support/system_error.cpp b/lib/Support/system_error.cpp index b22745afc33..b4a5f678ede 100644 --- a/lib/Support/system_error.cpp +++ b/lib/Support/system_error.cpp @@ -48,8 +48,8 @@ _do_message::message(int ev) const { class _generic_error_category : public _do_message { public: - virtual const char* name() const LLVM_OVERRIDE; - virtual std::string message(int ev) const LLVM_OVERRIDE; + virtual const char* name() const override; + virtual std::string message(int ev) const override; }; const char* @@ -74,9 +74,9 @@ generic_category() { class _system_error_category : public _do_message { public: - virtual const char* name() const LLVM_OVERRIDE; - virtual std::string message(int ev) const LLVM_OVERRIDE; - virtual error_condition default_error_condition(int ev) const LLVM_OVERRIDE; + virtual const char* name() const override; + virtual std::string message(int ev) const override; + virtual error_condition default_error_condition(int ev) const override; }; const char* diff --git a/lib/Target/AArch64/AArch64ISelLowering.h b/lib/Target/AArch64/AArch64ISelLowering.h index 149de557d08..85e25ad6c47 100644 --- a/lib/Target/AArch64/AArch64ISelLowering.h +++ b/lib/Target/AArch64/AArch64ISelLowering.h @@ -221,7 +221,7 @@ public: const SmallVectorImpl &OutVals, SDLoc dl, SelectionDAG &DAG) const; - virtual unsigned getByValTypeAlignment(Type *Ty) const LLVM_OVERRIDE; + virtual unsigned getByValTypeAlignment(Type *Ty) const override; SDValue LowerCall(CallLoweringInfo &CLI, SmallVectorImpl &InVals) const; @@ -346,7 +346,7 @@ public: getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const; virtual bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, - unsigned Intrinsic) const LLVM_OVERRIDE; + unsigned Intrinsic) const override; protected: std::pair diff --git a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp index 8497bee8735..5d54da84dee 100644 --- a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -52,7 +52,7 @@ public: initializeAArch64TTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -60,7 +60,7 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -68,7 +68,7 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; diff --git a/lib/Target/ARM/ARMAsmPrinter.h b/lib/Target/ARM/ARMAsmPrinter.h index 8c4a6b6e599..bff7d8d4f64 100644 --- a/lib/Target/ARM/ARMAsmPrinter.h +++ b/lib/Target/ARM/ARMAsmPrinter.h @@ -49,7 +49,7 @@ public: Subtarget = &TM.getSubtarget(); } - virtual const char *getPassName() const LLVM_OVERRIDE { + virtual const char *getPassName() const override { return "ARM Assembly / Object Emitter"; } @@ -58,28 +58,27 @@ public: virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &O) LLVM_OVERRIDE; + raw_ostream &O) override; virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &O) LLVM_OVERRIDE; + raw_ostream &O) override; virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, - const MCSubtargetInfo *EndInfo) const - LLVM_OVERRIDE; + const MCSubtargetInfo *EndInfo) const override; void EmitJumpTable(const MachineInstr *MI); void EmitJump2Table(const MachineInstr *MI); - virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE; - virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE; + virtual void EmitInstruction(const MachineInstr *MI) override; + virtual bool runOnMachineFunction(MachineFunction &F) override; - virtual void EmitConstantPool() LLVM_OVERRIDE { + virtual void EmitConstantPool() override { // we emit constant pools customly! } - virtual void EmitFunctionBodyEnd() LLVM_OVERRIDE; - virtual void EmitFunctionEntryLabel() LLVM_OVERRIDE; - virtual void EmitStartOfAsmFile(Module &M) LLVM_OVERRIDE; - virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE; - virtual void EmitXXStructor(const Constant *CV) LLVM_OVERRIDE; + virtual void EmitFunctionBodyEnd() override; + virtual void EmitFunctionEntryLabel() override; + virtual void EmitStartOfAsmFile(Module &M) override; + virtual void EmitEndOfAsmFile(Module &M) override; + virtual void EmitXXStructor(const Constant *CV) override; // lowerOperand - Convert a MachineOperand into the equivalent MCOperand. bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp); @@ -98,7 +97,7 @@ private: const MachineInstr *MI); public: - virtual unsigned getISAEncoding() LLVM_OVERRIDE { + virtual unsigned getISAEncoding() override { // ARM/Darwin adds ISA to the DWARF info for each function. if (!Subtarget->isTargetMachO()) return 0; @@ -118,7 +117,7 @@ public: /// EmitMachineConstantPoolValue - Print a machine constantpool value to /// the .s file. virtual void - EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) LLVM_OVERRIDE; + EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override; }; } // end namespace llvm diff --git a/lib/Target/ARM/ARMTargetObjectFile.h b/lib/Target/ARM/ARMTargetObjectFile.h index aee5836141b..5f8d6120284 100644 --- a/lib/Target/ARM/ARMTargetObjectFile.h +++ b/lib/Target/ARM/ARMTargetObjectFile.h @@ -26,17 +26,16 @@ public: AttributesSection(NULL) {} - void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE; + void Initialize(MCContext &Ctx, const TargetMachine &TM) override; const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, MCStreamer &Streamer) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI, + MCStreamer &Streamer) const override; /// \brief Describe a TLS variable address within debug info. - const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const - LLVM_OVERRIDE; + const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; }; } // end namespace llvm diff --git a/lib/Target/ARM/ARMTargetTransformInfo.cpp b/lib/Target/ARM/ARMTargetTransformInfo.cpp index 7a155919391..31ad0b5d2c4 100644 --- a/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -52,7 +52,7 @@ public: initializeARMTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -60,7 +60,7 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -68,7 +68,7 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; @@ -78,7 +78,7 @@ public: /// @{ using TargetTransformInfo::getIntImmCost; virtual unsigned - getIntImmCost(const APInt &Imm, Type *Ty) const LLVM_OVERRIDE; + getIntImmCost(const APInt &Imm, Type *Ty) const override; /// @} diff --git a/lib/Target/Hexagon/HexagonMachineScheduler.h b/lib/Target/Hexagon/HexagonMachineScheduler.h index 8106a205a49..300f1c7e9e9 100644 --- a/lib/Target/Hexagon/HexagonMachineScheduler.h +++ b/lib/Target/Hexagon/HexagonMachineScheduler.h @@ -99,7 +99,7 @@ public: /// Schedule - This is called back from ScheduleDAGInstrs::Run() when it's /// time to do some work. - virtual void schedule() LLVM_OVERRIDE; + virtual void schedule() override; /// Perform platform specific DAG postprocessing. void postprocessDAG(); }; @@ -206,15 +206,15 @@ public: ConvergingVLIWScheduler(): DAG(0), SchedModel(0), Top(TopQID, "TopQ"), Bot(BotQID, "BotQ") {} - virtual void initialize(ScheduleDAGMI *dag) LLVM_OVERRIDE; + virtual void initialize(ScheduleDAGMI *dag) override; - virtual SUnit *pickNode(bool &IsTopNode) LLVM_OVERRIDE; + virtual SUnit *pickNode(bool &IsTopNode) override; - virtual void schedNode(SUnit *SU, bool IsTopNode) LLVM_OVERRIDE; + virtual void schedNode(SUnit *SU, bool IsTopNode) override; - virtual void releaseTopNode(SUnit *SU) LLVM_OVERRIDE; + virtual void releaseTopNode(SUnit *SU) override; - virtual void releaseBottomNode(SUnit *SU) LLVM_OVERRIDE; + virtual void releaseBottomNode(SUnit *SU) override; unsigned ReportPackets() { return Top.ResourceModel->getTotalPackets() + diff --git a/lib/Target/Hexagon/HexagonTargetObjectFile.h b/lib/Target/Hexagon/HexagonTargetObjectFile.h index fdc24a6b202..1bd1272befc 100644 --- a/lib/Target/Hexagon/HexagonTargetObjectFile.h +++ b/lib/Target/Hexagon/HexagonTargetObjectFile.h @@ -19,7 +19,7 @@ namespace llvm { const MCSectionELF *SmallDataSection; const MCSectionELF *SmallBSSSection; public: - void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE; + void Initialize(MCContext &Ctx, const TargetMachine &TM) override; /// IsGlobalInSmallSection - Return true if this global address should be /// placed into small data/bss section. @@ -31,9 +31,8 @@ namespace llvm { bool IsSmallDataEnabled () const; const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; }; } // namespace llvm diff --git a/lib/Target/Mips/MipsAsmPrinter.h b/lib/Target/Mips/MipsAsmPrinter.h index c99c6d357d0..3e9093e2e46 100644 --- a/lib/Target/Mips/MipsAsmPrinter.h +++ b/lib/Target/Mips/MipsAsmPrinter.h @@ -93,7 +93,7 @@ public: virtual bool runOnMachineFunction(MachineFunction &MF); - virtual void EmitConstantPool() LLVM_OVERRIDE { + virtual void EmitConstantPool() override { bool UsingConstantPools = (Subtarget->inMips16Mode() && Subtarget->useConstantIslands()); if (!UsingConstantPools) diff --git a/lib/Target/Mips/MipsSEISelLowering.h b/lib/Target/Mips/MipsSEISelLowering.h index 75a9b86e50b..079fbf697b2 100644 --- a/lib/Target/Mips/MipsSEISelLowering.h +++ b/lib/Target/Mips/MipsSEISelLowering.h @@ -30,9 +30,8 @@ namespace llvm { void addMSAFloatType(MVT::SimpleValueType Ty, const TargetRegisterClass *RC); - virtual bool allowsUnalignedMemoryAccesses( - EVT VT, unsigned AS = 0, - bool *Fast = 0) const LLVM_OVERRIDE; + virtual bool allowsUnalignedMemoryAccesses(EVT VT, unsigned AS = 0, + bool *Fast = 0) const override; virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; diff --git a/lib/Target/Mips/MipsTargetObjectFile.h b/lib/Target/Mips/MipsTargetObjectFile.h index d61e8fd0385..2bf5a75be90 100644 --- a/lib/Target/Mips/MipsTargetObjectFile.h +++ b/lib/Target/Mips/MipsTargetObjectFile.h @@ -19,7 +19,7 @@ namespace llvm { const MCSection *SmallBSSSection; public: - void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE; + void Initialize(MCContext &Ctx, const TargetMachine &TM) override; /// IsGlobalInSmallSection - Return true if this global address should be @@ -30,9 +30,8 @@ namespace llvm { const TargetMachine &TM) const; const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; }; } // end namespace llvm diff --git a/lib/Target/Mips/MipsTargetStreamer.h b/lib/Target/Mips/MipsTargetStreamer.h index b5d04ffba18..6710666502d 100644 --- a/lib/Target/Mips/MipsTargetStreamer.h +++ b/lib/Target/Mips/MipsTargetStreamer.h @@ -79,8 +79,8 @@ public: MCELFStreamer &getStreamer(); MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI); - virtual void emitLabel(MCSymbol *Symbol) LLVM_OVERRIDE; - void finish() LLVM_OVERRIDE; + virtual void emitLabel(MCSymbol *Symbol) override; + void finish() override; virtual void emitDirectiveSetMicroMips(); virtual void emitDirectiveSetNoMicroMips(); diff --git a/lib/Target/NVPTX/NVPTXTargetMachine.cpp b/lib/Target/NVPTX/NVPTXTargetMachine.cpp index 4093c6fd43b..5ab8cea48fd 100644 --- a/lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ b/lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -117,7 +117,7 @@ public: virtual bool addPreRegAlloc(); virtual bool addPostRegAlloc(); - virtual FunctionPass *createTargetRegisterAllocator(bool) LLVM_OVERRIDE; + virtual FunctionPass *createTargetRegisterAllocator(bool) override; virtual void addFastRegAlloc(FunctionPass *RegAllocPass); virtual void addOptimizedRegAlloc(FunctionPass *RegAllocPass); }; diff --git a/lib/Target/NVPTX/NVPTXTargetObjectFile.h b/lib/Target/NVPTX/NVPTXTargetObjectFile.h index 4872fc484fe..2a7281e00d3 100644 --- a/lib/Target/NVPTX/NVPTXTargetObjectFile.h +++ b/lib/Target/NVPTX/NVPTXTargetObjectFile.h @@ -46,7 +46,7 @@ public: virtual ~NVPTXTargetObjectFile(); - void Initialize(MCContext &ctx, const TargetMachine &TM) LLVM_OVERRIDE { + void Initialize(MCContext &ctx, const TargetMachine &TM) override { TargetLoweringObjectFile::Initialize(ctx, TM); TextSection = new NVPTXSection(MCSection::SV_ELF, SectionKind::getText()); DataSection = @@ -87,14 +87,13 @@ public: new NVPTXSection(MCSection::SV_ELF, SectionKind::getMetadata()); } - const MCSection *getSectionForConstant(SectionKind Kind) const LLVM_OVERRIDE { + const MCSection *getSectionForConstant(SectionKind Kind) const override { return ReadOnlySection; } const MCSection *getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE { + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override { return DataSection; } diff --git a/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp b/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp index 1dab14b2ca8..23866dc70bb 100644 --- a/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp +++ b/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp @@ -32,7 +32,7 @@ public: const MemoryObject ®ion, uint64_t address, raw_ostream &vStream, - raw_ostream &cStream) const LLVM_OVERRIDE; + raw_ostream &cStream) const override; }; } // end anonymous namespace diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.h b/lib/Target/PowerPC/PPCTargetObjectFile.h index 475ebd8a715..3e71bbc6737 100644 --- a/lib/Target/PowerPC/PPCTargetObjectFile.h +++ b/lib/Target/PowerPC/PPCTargetObjectFile.h @@ -20,16 +20,14 @@ namespace llvm { /// 64-bit PowerPC Linux. class PPC64LinuxTargetObjectFile : public TargetLoweringObjectFileELF { - void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE; + void Initialize(MCContext &Ctx, const TargetMachine &TM) override; const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; /// \brief Describe a TLS variable address within debug info. - const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const - LLVM_OVERRIDE; + const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; }; } // end namespace llvm diff --git a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp index 70eaba0dad3..22cdd66dbb5 100644 --- a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -52,7 +52,7 @@ public: initializePPCTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -60,7 +60,7 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -68,7 +68,7 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; @@ -77,32 +77,32 @@ public: /// \name Scalar TTI Implementations /// @{ virtual PopcntSupportKind - getPopcntSupport(unsigned TyWidth) const LLVM_OVERRIDE; + getPopcntSupport(unsigned TyWidth) const override; virtual void getUnrollingPreferences( - Loop *L, UnrollingPreferences &UP) const LLVM_OVERRIDE; + Loop *L, UnrollingPreferences &UP) const override; /// @} /// \name Vector TTI Implementations /// @{ - virtual unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE; - virtual unsigned getRegisterBitWidth(bool Vector) const LLVM_OVERRIDE; - virtual unsigned getMaximumUnrollFactor() const LLVM_OVERRIDE; + virtual unsigned getNumberOfRegisters(bool Vector) const override; + virtual unsigned getRegisterBitWidth(bool Vector) const override; + virtual unsigned getMaximumUnrollFactor() const override; virtual unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind, - OperandValueKind) const LLVM_OVERRIDE; + OperandValueKind) const override; virtual unsigned getShuffleCost(ShuffleKind Kind, Type *Tp, - int Index, Type *SubTp) const LLVM_OVERRIDE; + int Index, Type *SubTp) const override; virtual unsigned getCastInstrCost(unsigned Opcode, Type *Dst, - Type *Src) const LLVM_OVERRIDE; + Type *Src) const override; virtual unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy) const LLVM_OVERRIDE; + Type *CondTy) const override; virtual unsigned getVectorInstrCost(unsigned Opcode, Type *Val, - unsigned Index) const LLVM_OVERRIDE; + unsigned Index) const override; virtual unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) const LLVM_OVERRIDE; + unsigned AddressSpace) const override; /// @} }; diff --git a/lib/Target/R600/AMDGPUISelLowering.h b/lib/Target/R600/AMDGPUISelLowering.h index 7fa25905d01..2efb9c78a3e 100644 --- a/lib/Target/R600/AMDGPUISelLowering.h +++ b/lib/Target/R600/AMDGPUISelLowering.h @@ -83,12 +83,12 @@ protected: public: AMDGPUTargetLowering(TargetMachine &TM); - virtual bool isFAbsFree(EVT VT) const LLVM_OVERRIDE; - virtual bool isFNegFree(EVT VT) const LLVM_OVERRIDE; - virtual bool isTruncateFree(EVT Src, EVT Dest) const LLVM_OVERRIDE; - virtual bool isTruncateFree(Type *Src, Type *Dest) const LLVM_OVERRIDE; - virtual MVT getVectorIdxTy() const LLVM_OVERRIDE; - virtual bool isLoadBitCastBeneficial(EVT, EVT) const LLVM_OVERRIDE; + virtual bool isFAbsFree(EVT VT) const override; + virtual bool isFNegFree(EVT VT) const override; + virtual bool isTruncateFree(EVT Src, EVT Dest) const override; + virtual bool isTruncateFree(Type *Src, Type *Dest) const override; + virtual MVT getVectorIdxTy() const override; + virtual bool isLoadBitCastBeneficial(EVT, EVT) const override; virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl &Outs, diff --git a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp index 1e35333d8ab..a335fc67f97 100644 --- a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp +++ b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp @@ -55,11 +55,11 @@ public: initializeAMDGPUTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { pushTTIStack(this); } + virtual void initializePass() override { pushTTIStack(this); } virtual void finalizePass() { popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -67,13 +67,13 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo *)this; return this; } - virtual bool hasBranchDivergence() const LLVM_OVERRIDE; + virtual bool hasBranchDivergence() const override; virtual void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const; diff --git a/lib/Target/Sparc/SparcTargetObjectFile.h b/lib/Target/Sparc/SparcTargetObjectFile.h index cce4a786903..c60675b4945 100644 --- a/lib/Target/Sparc/SparcTargetObjectFile.h +++ b/lib/Target/Sparc/SparcTargetObjectFile.h @@ -26,8 +26,8 @@ public: const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, MCStreamer &Streamer) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI, + MCStreamer &Streamer) const override; }; } // end namespace llvm diff --git a/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp b/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp index e78b1a2ac7f..389b1230ca4 100644 --- a/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp +++ b/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp @@ -162,7 +162,7 @@ public: } // Token operands - virtual bool isToken() const LLVM_OVERRIDE { + virtual bool isToken() const override { return Kind == KindToken; } StringRef getToken() const { @@ -171,13 +171,13 @@ public: } // Register operands. - virtual bool isReg() const LLVM_OVERRIDE { + virtual bool isReg() const override { return Kind == KindReg; } bool isReg(RegisterKind RegKind) const { return Kind == KindReg && Reg.Kind == RegKind; } - virtual unsigned getReg() const LLVM_OVERRIDE { + virtual unsigned getReg() const override { assert(Kind == KindReg && "Not a register"); return Reg.Num; } @@ -189,7 +189,7 @@ public: } // Immediate operands. - virtual bool isImm() const LLVM_OVERRIDE { + virtual bool isImm() const override { return Kind == KindImm; } bool isImm(int64_t MinValue, int64_t MaxValue) const { @@ -201,7 +201,7 @@ public: } // Memory operands. - virtual bool isMem() const LLVM_OVERRIDE { + virtual bool isMem() const override { return Kind == KindMem; } bool isMem(RegisterKind RegKind, MemoryKind MemKind) const { @@ -221,9 +221,9 @@ public: } // Override MCParsedAsmOperand. - virtual SMLoc getStartLoc() const LLVM_OVERRIDE { return StartLoc; } - virtual SMLoc getEndLoc() const LLVM_OVERRIDE { return EndLoc; } - virtual void print(raw_ostream &OS) const LLVM_OVERRIDE; + virtual SMLoc getStartLoc() const override { return StartLoc; } + virtual SMLoc getEndLoc() const override { return EndLoc; } + virtual void print(raw_ostream &OS) const override; // Used by the TableGen code to add particular types of operand // to an instruction. @@ -340,18 +340,18 @@ public: } // Override MCTargetAsmParser. - virtual bool ParseDirective(AsmToken DirectiveID) LLVM_OVERRIDE; + virtual bool ParseDirective(AsmToken DirectiveID) override; virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, - SMLoc &EndLoc) LLVM_OVERRIDE; - virtual bool ParseInstruction(ParseInstructionInfo &Info, - StringRef Name, SMLoc NameLoc, - SmallVectorImpl &Operands) - LLVM_OVERRIDE; + SMLoc &EndLoc) override; + virtual bool + ParseInstruction(ParseInstructionInfo &Info, + StringRef Name, SMLoc NameLoc, + SmallVectorImpl &Operands) override; virtual bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, SmallVectorImpl &Operands, MCStreamer &Out, unsigned &ErrorInfo, - bool MatchingInlineAsm) LLVM_OVERRIDE; + bool MatchingInlineAsm) override; // Used by the TableGen code to parse particular operand types. OperandMatchResultTy diff --git a/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp b/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp index fc3c38d2f34..4a7bbef290c 100644 --- a/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp +++ b/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp @@ -32,7 +32,7 @@ public: const MemoryObject ®ion, uint64_t address, raw_ostream &vStream, - raw_ostream &cStream) const LLVM_OVERRIDE; + raw_ostream &cStream) const override; }; } // end anonymous namespace diff --git a/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h b/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h index 734ecf0ff23..6882341439f 100644 --- a/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h +++ b/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h @@ -38,10 +38,9 @@ public: static void printOperand(const MCOperand &MO, raw_ostream &O); // Override MCInstPrinter. - virtual void printRegName(raw_ostream &O, unsigned RegNo) const - LLVM_OVERRIDE; - virtual void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot) - LLVM_OVERRIDE; + virtual void printRegName(raw_ostream &O, unsigned RegNo) const override; + virtual void printInst(const MCInst *MI, raw_ostream &O, + StringRef Annot) override; private: // Print various types of operand. diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp index 1098c911bdf..da1838345cb 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp @@ -43,31 +43,28 @@ public: : OSABI(osABI) {} // Override MCAsmBackend - virtual unsigned getNumFixupKinds() const LLVM_OVERRIDE { + virtual unsigned getNumFixupKinds() const override { return SystemZ::NumTargetFixupKinds; } - virtual const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const - LLVM_OVERRIDE; + virtual const MCFixupKindInfo & + getFixupKindInfo(MCFixupKind Kind) const override; virtual void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, - uint64_t Value) const LLVM_OVERRIDE; - virtual bool mayNeedRelaxation(const MCInst &Inst) const LLVM_OVERRIDE { + uint64_t Value) const override; + virtual bool mayNeedRelaxation(const MCInst &Inst) const override { return false; } virtual bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *Fragment, - const MCAsmLayout &Layout) const - LLVM_OVERRIDE { + const MCAsmLayout &Layout) const override { return false; } virtual void relaxInstruction(const MCInst &Inst, - MCInst &Res) const LLVM_OVERRIDE { + MCInst &Res) const override { llvm_unreachable("SystemZ does do not have assembler relaxation"); } - virtual bool writeNopData(uint64_t Count, - MCObjectWriter *OW) const LLVM_OVERRIDE; - virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const - LLVM_OVERRIDE { + virtual bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override; + virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const override { return createSystemZObjectWriter(OS, OSABI); } }; diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h index b9ac92a6934..27bbf5c1147 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h @@ -21,8 +21,8 @@ public: explicit SystemZMCAsmInfo(StringRef TT); // Override MCAsmInfo; - virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const - LLVM_OVERRIDE; + virtual const MCSection * + getNonexecutableStackSection(MCContext &Ctx) const override; }; } // namespace llvm diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp index 84dc47300ca..6e85ddd5781 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp @@ -36,8 +36,7 @@ public: // OVerride MCCodeEmitter. virtual void EncodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, - const MCSubtargetInfo &STI) const - LLVM_OVERRIDE; + const MCSubtargetInfo &STI) const override; private: // Automatically generated by TableGen. diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp index 36e3d83d4d5..d0c2cfa6298 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp @@ -26,12 +26,12 @@ protected: // Override MCELFObjectTargetWriter. virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel, bool IsRelocWithSymbol, - int64_t Addend) const LLVM_OVERRIDE; + int64_t Addend) const override; virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm, const MCValue &Target, const MCFragment &F, const MCFixup &Fixup, - bool IsPCRel) const LLVM_OVERRIDE; + bool IsPCRel) const override; }; } // end anonymouse namespace diff --git a/lib/Target/SystemZ/SystemZAsmPrinter.h b/lib/Target/SystemZ/SystemZAsmPrinter.h index 4b6c51b6f0b..bde60374c8f 100644 --- a/lib/Target/SystemZ/SystemZAsmPrinter.h +++ b/lib/Target/SystemZ/SystemZAsmPrinter.h @@ -32,20 +32,20 @@ public: } // Override AsmPrinter. - virtual const char *getPassName() const LLVM_OVERRIDE { + virtual const char *getPassName() const override { return "SystemZ Assembly Printer"; } - virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE; - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) - LLVM_OVERRIDE; + virtual void EmitInstruction(const MachineInstr *MI) override; + virtual void + EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override; virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS) LLVM_OVERRIDE; + raw_ostream &OS) override; virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS) LLVM_OVERRIDE; - virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE; + raw_ostream &OS) override; + virtual void EmitEndOfAsmFile(Module &M) override; }; } // end namespace llvm diff --git a/lib/Target/SystemZ/SystemZConstantPoolValue.h b/lib/Target/SystemZ/SystemZConstantPoolValue.h index 9927bdb262c..60944cc42f3 100644 --- a/lib/Target/SystemZ/SystemZConstantPoolValue.h +++ b/lib/Target/SystemZ/SystemZConstantPoolValue.h @@ -39,11 +39,11 @@ public: Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier); // Override MachineConstantPoolValue. - virtual unsigned getRelocationInfo() const LLVM_OVERRIDE; + virtual unsigned getRelocationInfo() const override; virtual int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) LLVM_OVERRIDE; - virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID) LLVM_OVERRIDE; - virtual void print(raw_ostream &O) const LLVM_OVERRIDE; + unsigned Alignment) override; + virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID) override; + virtual void print(raw_ostream &O) const override; // Access SystemZ-specific fields. const GlobalValue *getGlobalValue() const { return GV; } diff --git a/lib/Target/SystemZ/SystemZFrameLowering.h b/lib/Target/SystemZ/SystemZFrameLowering.h index 9b0a1d5f224..601b14a2f0d 100644 --- a/lib/Target/SystemZ/SystemZFrameLowering.h +++ b/lib/Target/SystemZ/SystemZFrameLowering.h @@ -30,39 +30,36 @@ public: const SystemZSubtarget &sti); // Override TargetFrameLowering. - virtual bool isFPCloseToIncomingSP() const LLVM_OVERRIDE { return false; } - virtual const SpillSlot *getCalleeSavedSpillSlots(unsigned &NumEntries) const - LLVM_OVERRIDE; + virtual bool isFPCloseToIncomingSP() const override { return false; } + virtual const SpillSlot * + getCalleeSavedSpillSlots(unsigned &NumEntries) const override; virtual void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, - RegScavenger *RS) const LLVM_OVERRIDE; + RegScavenger *RS) const override; virtual bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const std::vector &CSI, const TargetRegisterInfo *TRI) const - LLVM_OVERRIDE; + override; virtual bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBII, const std::vector &CSI, - const TargetRegisterInfo *TRI) const - LLVM_OVERRIDE; + const TargetRegisterInfo *TRI) const override; virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const; - virtual void emitPrologue(MachineFunction &MF) const LLVM_OVERRIDE; + virtual void emitPrologue(MachineFunction &MF) const override; virtual void emitEpilogue(MachineFunction &MF, - MachineBasicBlock &MBB) const LLVM_OVERRIDE; - virtual bool hasFP(const MachineFunction &MF) const LLVM_OVERRIDE; + MachineBasicBlock &MBB) const override; + virtual bool hasFP(const MachineFunction &MF) const override; virtual int getFrameIndexOffset(const MachineFunction &MF, - int FI) const LLVM_OVERRIDE; - virtual bool hasReservedCallFrame(const MachineFunction &MF) const - LLVM_OVERRIDE; + int FI) const override; + virtual bool hasReservedCallFrame(const MachineFunction &MF) const override; virtual void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, - MachineBasicBlock::iterator MI) const - LLVM_OVERRIDE; + MachineBasicBlock::iterator MI) const override; // Return the number of bytes in the callee-allocated part of the frame. uint64_t getAllocatedStackSize(const MachineFunction &MF) const; diff --git a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index aa4752c2bab..dc92ff69c2e 100644 --- a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp @@ -318,16 +318,15 @@ public: Subtarget(*TM.getSubtargetImpl()) { } // Override MachineFunctionPass. - virtual const char *getPassName() const LLVM_OVERRIDE { + virtual const char *getPassName() const override { return "SystemZ DAG->DAG Pattern Instruction Selection"; } // Override SelectionDAGISel. - virtual SDNode *Select(SDNode *Node) LLVM_OVERRIDE; - virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, - char ConstraintCode, - std::vector &OutOps) - LLVM_OVERRIDE; + virtual SDNode *Select(SDNode *Node) override; + virtual bool + SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, + std::vector &OutOps) override; // Include the pieces autogenerated from the target description. #include "SystemZGenDAGISel.inc" diff --git a/lib/Target/SystemZ/SystemZISelLowering.h b/lib/Target/SystemZ/SystemZISelLowering.h index 13befbca05e..b96a424305e 100644 --- a/lib/Target/SystemZ/SystemZISelLowering.h +++ b/lib/Target/SystemZ/SystemZISelLowering.h @@ -201,58 +201,57 @@ public: explicit SystemZTargetLowering(SystemZTargetMachine &TM); // Override TargetLowering. - virtual MVT getScalarShiftAmountTy(EVT LHSTy) const LLVM_OVERRIDE { + virtual MVT getScalarShiftAmountTy(EVT LHSTy) const override { return MVT::i32; } - virtual EVT getSetCCResultType(LLVMContext &, EVT) const LLVM_OVERRIDE; - virtual bool isFMAFasterThanFMulAndFAdd(EVT VT) const LLVM_OVERRIDE; - virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const LLVM_OVERRIDE; - virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const - LLVM_OVERRIDE; - virtual bool allowsUnalignedMemoryAccesses(EVT VT, unsigned AS, - bool *Fast) const LLVM_OVERRIDE; - virtual bool isTruncateFree(Type *, Type *) const LLVM_OVERRIDE; - virtual bool isTruncateFree(EVT, EVT) const LLVM_OVERRIDE; - virtual const char *getTargetNodeName(unsigned Opcode) const LLVM_OVERRIDE; + virtual EVT getSetCCResultType(LLVMContext &, EVT) const override; + virtual bool isFMAFasterThanFMulAndFAdd(EVT VT) const override; + virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const override; + virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const override; + virtual bool + allowsUnalignedMemoryAccesses(EVT VT, unsigned AS, + bool *Fast) const override; + virtual bool isTruncateFree(Type *, Type *) const override; + virtual bool isTruncateFree(EVT, EVT) const override; + virtual const char *getTargetNodeName(unsigned Opcode) const override; virtual std::pair getRegForInlineAsmConstraint(const std::string &Constraint, - MVT VT) const LLVM_OVERRIDE; + MVT VT) const override; virtual TargetLowering::ConstraintType - getConstraintType(const std::string &Constraint) const LLVM_OVERRIDE; + getConstraintType(const std::string &Constraint) const override; virtual TargetLowering::ConstraintWeight getSingleConstraintMatchWeight(AsmOperandInfo &info, - const char *constraint) const LLVM_OVERRIDE; + const char *constraint) const override; virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector &Ops, - SelectionDAG &DAG) const LLVM_OVERRIDE; + SelectionDAG &DAG) const override; virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, - MachineBasicBlock *BB) const LLVM_OVERRIDE; + MachineBasicBlock *BB) const override; virtual SDValue LowerOperation(SDValue Op, - SelectionDAG &DAG) const LLVM_OVERRIDE; - virtual bool allowTruncateForTailCall(Type *, Type *) const LLVM_OVERRIDE; - virtual bool mayBeEmittedAsTailCall(CallInst *CI) const LLVM_OVERRIDE; + SelectionDAG &DAG) const override; + virtual bool allowTruncateForTailCall(Type *, Type *) const override; + virtual bool mayBeEmittedAsTailCall(CallInst *CI) const override; virtual SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl &Ins, SDLoc DL, SelectionDAG &DAG, - SmallVectorImpl &InVals) const LLVM_OVERRIDE; + SmallVectorImpl &InVals) const override; virtual SDValue LowerCall(CallLoweringInfo &CLI, - SmallVectorImpl &InVals) const LLVM_OVERRIDE; + SmallVectorImpl &InVals) const override; virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl &Outs, const SmallVectorImpl &OutVals, - SDLoc DL, SelectionDAG &DAG) const LLVM_OVERRIDE; + SDLoc DL, SelectionDAG &DAG) const override; virtual SDValue prepareVolatileOrAtomicLoad(SDValue Chain, SDLoc DL, - SelectionDAG &DAG) const - LLVM_OVERRIDE; + SelectionDAG &DAG) const override; private: const SystemZSubtarget &Subtarget; diff --git a/lib/Target/SystemZ/SystemZInstrInfo.h b/lib/Target/SystemZ/SystemZInstrInfo.h index be4c8fe2add..9dc781391a0 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.h +++ b/lib/Target/SystemZ/SystemZInstrInfo.h @@ -134,60 +134,58 @@ public: // Override TargetInstrInfo. virtual unsigned isLoadFromStackSlot(const MachineInstr *MI, - int &FrameIndex) const LLVM_OVERRIDE; + int &FrameIndex) const override; virtual unsigned isStoreToStackSlot(const MachineInstr *MI, - int &FrameIndex) const LLVM_OVERRIDE; + int &FrameIndex) const override; virtual bool isStackSlotCopy(const MachineInstr *MI, int &DestFrameIndex, - int &SrcFrameIndex) const LLVM_OVERRIDE; + int &SrcFrameIndex) const override; virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl &Cond, - bool AllowModify) const LLVM_OVERRIDE; - virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const LLVM_OVERRIDE; + bool AllowModify) const override; + virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const override; virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl &Cond, - DebugLoc DL) const LLVM_OVERRIDE; + DebugLoc DL) const override; bool analyzeCompare(const MachineInstr *MI, unsigned &SrcReg, - unsigned &SrcReg2, int &Mask, int &Value) const - LLVM_OVERRIDE; + unsigned &SrcReg2, int &Mask, int &Value) const override; bool optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2, int Mask, int Value, - const MachineRegisterInfo *MRI) const LLVM_OVERRIDE; - virtual bool isPredicable(MachineInstr *MI) const LLVM_OVERRIDE; - virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, - unsigned ExtraPredCycles, - const BranchProbability &Probability) const - LLVM_OVERRIDE; - virtual bool isProfitableToIfCvt(MachineBasicBlock &TMBB, - unsigned NumCyclesT, - unsigned ExtraPredCyclesT, - MachineBasicBlock &FMBB, - unsigned NumCyclesF, - unsigned ExtraPredCyclesF, - const BranchProbability &Probability) const - LLVM_OVERRIDE; + const MachineRegisterInfo *MRI) const override; + virtual bool isPredicable(MachineInstr *MI) const override; + virtual bool + isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, + unsigned ExtraPredCycles, + const BranchProbability &Probability) const override; + virtual bool + isProfitableToIfCvt(MachineBasicBlock &TMBB, + unsigned NumCyclesT, + unsigned ExtraPredCyclesT, + MachineBasicBlock &FMBB, + unsigned NumCyclesF, + unsigned ExtraPredCyclesF, + const BranchProbability &Probability) const override; virtual bool PredicateInstruction(MachineInstr *MI, - const SmallVectorImpl &Pred) const - LLVM_OVERRIDE; + const SmallVectorImpl &Pred) const override; virtual void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, unsigned DestReg, unsigned SrcReg, - bool KillSrc) const LLVM_OVERRIDE; + bool KillSrc) const override; virtual void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, - const TargetRegisterInfo *TRI) const LLVM_OVERRIDE; + const TargetRegisterInfo *TRI) const override; virtual void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIdx, const TargetRegisterClass *RC, - const TargetRegisterInfo *TRI) const LLVM_OVERRIDE; + const TargetRegisterInfo *TRI) const override; virtual MachineInstr * convertToThreeAddress(MachineFunction::iterator &MFI, MachineBasicBlock::iterator &MBBI, @@ -201,10 +199,9 @@ public: const SmallVectorImpl &Ops, MachineInstr* LoadMI) const; virtual bool - expandPostRAPseudo(MachineBasicBlock::iterator MBBI) const LLVM_OVERRIDE; + expandPostRAPseudo(MachineBasicBlock::iterator MBBI) const override; virtual bool - ReverseBranchCondition(SmallVectorImpl &Cond) const - LLVM_OVERRIDE; + ReverseBranchCondition(SmallVectorImpl &Cond) const override; // Return the SystemZRegisterInfo, which this class owns. const SystemZRegisterInfo &getRegisterInfo() const { return RI; } diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.h b/lib/Target/SystemZ/SystemZRegisterInfo.h index 13f45faba07..9c82645fa96 100644 --- a/lib/Target/SystemZ/SystemZRegisterInfo.h +++ b/lib/Target/SystemZ/SystemZRegisterInfo.h @@ -40,27 +40,25 @@ public: SystemZRegisterInfo(SystemZTargetMachine &tm); // Override TargetRegisterInfo.h. - virtual bool requiresRegisterScavenging(const MachineFunction &MF) const - LLVM_OVERRIDE { + virtual bool + requiresRegisterScavenging(const MachineFunction &MF) const override { return true; } - virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const - LLVM_OVERRIDE { + virtual bool + requiresFrameIndexScavenging(const MachineFunction &MF) const override { return true; } - virtual bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const - LLVM_OVERRIDE { + virtual bool + trackLivenessAfterRegAlloc(const MachineFunction &MF) const override { return true; } - virtual const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) - const LLVM_OVERRIDE; - virtual BitVector getReservedRegs(const MachineFunction &MF) - const LLVM_OVERRIDE; + virtual const uint16_t * + getCalleeSavedRegs(const MachineFunction *MF = 0) const override; + virtual BitVector getReservedRegs(const MachineFunction &MF) const override; virtual void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, - RegScavenger *RS) const LLVM_OVERRIDE; - virtual unsigned getFrameRegister(const MachineFunction &MF) const - LLVM_OVERRIDE; + RegScavenger *RS) const override; + virtual unsigned getFrameRegister(const MachineFunction &MF) const override; }; } // end namespace llvm diff --git a/lib/Target/SystemZ/SystemZSelectionDAGInfo.h b/lib/Target/SystemZ/SystemZSelectionDAGInfo.h index 281d1e291dc..d8e580618f3 100644 --- a/lib/Target/SystemZ/SystemZSelectionDAGInfo.h +++ b/lib/Target/SystemZ/SystemZSelectionDAGInfo.h @@ -31,48 +31,47 @@ public: SDValue Size, unsigned Align, bool IsVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, - MachinePointerInfo SrcPtrInfo) const - LLVM_OVERRIDE; + MachinePointerInfo SrcPtrInfo) const override; virtual SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, SDValue Byte, SDValue Size, unsigned Align, bool IsVolatile, - MachinePointerInfo DstPtrInfo) const LLVM_OVERRIDE; + MachinePointerInfo DstPtrInfo) const override; virtual std::pair EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, SDValue Size, MachinePointerInfo Op1PtrInfo, - MachinePointerInfo Op2PtrInfo) const LLVM_OVERRIDE; + MachinePointerInfo Op2PtrInfo) const override; virtual std::pair EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, - MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE; + MachinePointerInfo SrcPtrInfo) const override; virtual std::pair EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, - bool isStpcpy) const LLVM_OVERRIDE; + bool isStpcpy) const override; virtual std::pair EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, MachinePointerInfo Op1PtrInfo, - MachinePointerInfo Op2PtrInfo) const LLVM_OVERRIDE; + MachinePointerInfo Op2PtrInfo) const override; virtual std::pair EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, - SDValue Src, MachinePointerInfo SrcPtrInfo) const - LLVM_OVERRIDE; + SDValue Src, + MachinePointerInfo SrcPtrInfo) const override; virtual std::pair EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue MaxLength, - MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE; + MachinePointerInfo SrcPtrInfo) const override; }; } diff --git a/lib/Target/SystemZ/SystemZSubtarget.h b/lib/Target/SystemZ/SystemZSubtarget.h index f7c8f96c044..fbb89efc6a6 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.h +++ b/lib/Target/SystemZ/SystemZSubtarget.h @@ -43,7 +43,7 @@ public: const std::string &FS); // This is important for reducing register pressure in vector code. - virtual bool useAA() const LLVM_OVERRIDE { return true; } + virtual bool useAA() const override { return true; } // Automatically generated by tblgen. void ParseSubtargetFeatures(StringRef CPU, StringRef FS); diff --git a/lib/Target/SystemZ/SystemZTargetMachine.cpp b/lib/Target/SystemZ/SystemZTargetMachine.cpp index 769bee51e38..637479be32d 100644 --- a/lib/Target/SystemZ/SystemZTargetMachine.cpp +++ b/lib/Target/SystemZ/SystemZTargetMachine.cpp @@ -47,10 +47,10 @@ public: return getTM(); } - virtual void addIRPasses() LLVM_OVERRIDE; - virtual bool addInstSelector() LLVM_OVERRIDE; - virtual bool addPreSched2() LLVM_OVERRIDE; - virtual bool addPreEmitPass() LLVM_OVERRIDE; + virtual void addIRPasses() override; + virtual bool addInstSelector() override; + virtual bool addPreSched2() override; + virtual bool addPreEmitPass() override; }; } // end anonymous namespace diff --git a/lib/Target/SystemZ/SystemZTargetMachine.h b/lib/Target/SystemZ/SystemZTargetMachine.h index b3e56dbbc09..c8b924259a9 100644 --- a/lib/Target/SystemZ/SystemZTargetMachine.h +++ b/lib/Target/SystemZ/SystemZTargetMachine.h @@ -42,31 +42,30 @@ public: CodeGenOpt::Level OL); // Override TargetMachine. - virtual const TargetFrameLowering *getFrameLowering() const LLVM_OVERRIDE { + virtual const TargetFrameLowering *getFrameLowering() const override { return &FrameLowering; } - virtual const SystemZInstrInfo *getInstrInfo() const LLVM_OVERRIDE { + virtual const SystemZInstrInfo *getInstrInfo() const override { return &InstrInfo; } - virtual const SystemZSubtarget *getSubtargetImpl() const LLVM_OVERRIDE { + virtual const SystemZSubtarget *getSubtargetImpl() const override { return &Subtarget; } - virtual const DataLayout *getDataLayout() const LLVM_OVERRIDE { + virtual const DataLayout *getDataLayout() const override { return &DL; } - virtual const SystemZRegisterInfo *getRegisterInfo() const LLVM_OVERRIDE { + virtual const SystemZRegisterInfo *getRegisterInfo() const override { return &InstrInfo.getRegisterInfo(); } - virtual const SystemZTargetLowering *getTargetLowering() const LLVM_OVERRIDE { + virtual const SystemZTargetLowering *getTargetLowering() const override { return &TLInfo; } - virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const - LLVM_OVERRIDE { + virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const override { return &TSInfo; } // Override LLVMTargetMachine - virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) LLVM_OVERRIDE; + virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) override; }; } // end namespace llvm diff --git a/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp b/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp index 31dc1107ecc..8b7c7c91191 100644 --- a/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp +++ b/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp @@ -31,7 +31,7 @@ namespace { virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, - bool IsCrossSection) const LLVM_OVERRIDE; + bool IsCrossSection) const override; }; } diff --git a/lib/Target/X86/X86AsmPrinter.h b/lib/Target/X86/X86AsmPrinter.h index d6adf689b1d..85b8723a4e8 100644 --- a/lib/Target/X86/X86AsmPrinter.h +++ b/lib/Target/X86/X86AsmPrinter.h @@ -33,26 +33,26 @@ class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter { Subtarget = &TM.getSubtarget(); } - virtual const char *getPassName() const LLVM_OVERRIDE { + virtual const char *getPassName() const override { return "X86 Assembly / Object Emitter"; } const X86Subtarget &getSubtarget() const { return *Subtarget; } - virtual void EmitStartOfAsmFile(Module &M) LLVM_OVERRIDE; + virtual void EmitStartOfAsmFile(Module &M) override; - virtual void EmitEndOfAsmFile(Module &M) LLVM_OVERRIDE; + virtual void EmitEndOfAsmFile(Module &M) override; - virtual void EmitInstruction(const MachineInstr *MI) LLVM_OVERRIDE; + virtual void EmitInstruction(const MachineInstr *MI) override; virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS) LLVM_OVERRIDE; + raw_ostream &OS) override; virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS) LLVM_OVERRIDE; + raw_ostream &OS) override; - virtual bool runOnMachineFunction(MachineFunction &F) LLVM_OVERRIDE; + virtual bool runOnMachineFunction(MachineFunction &F) override; }; } // end namespace llvm diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index ce9594ae3ed..af97b15cc19 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -784,7 +784,8 @@ namespace llvm { SDValue BuildFILD(SDValue Op, EVT SrcVT, SDValue Chain, SDValue StackSlot, SelectionDAG &DAG) const; - virtual bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const LLVM_OVERRIDE; + virtual bool isNoopAddrSpaceCast(unsigned SrcAS, + unsigned DestAS) const override; /// \brief Reset the operation actions based on target options. virtual void resetOperationActions(); diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h index 600e3922a71..2b7d4f47a20 100644 --- a/lib/Target/X86/X86InstrInfo.h +++ b/lib/Target/X86/X86InstrInfo.h @@ -342,7 +342,7 @@ public: unsigned NumLoads) const; virtual bool shouldScheduleAdjacent(MachineInstr* First, - MachineInstr *Second) const LLVM_OVERRIDE; + MachineInstr *Second) const override; virtual void getNoopForMachoTarget(MCInst &NopInst) const; diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index 1e9fba8dd67..996af79ccd3 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -406,7 +406,7 @@ public: bool hasSinCos() const; /// Enable the MachineScheduler pass for all X86 subtargets. - bool enableMachineScheduler() const LLVM_OVERRIDE { return true; } + bool enableMachineScheduler() const override { return true; } /// enablePostRAScheduler - run for Atom optimization. bool enablePostRAScheduler(CodeGenOpt::Level OptLevel, diff --git a/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h index 22f3e572d9c..1c0a1984a68 100644 --- a/lib/Target/X86/X86TargetObjectFile.h +++ b/lib/Target/X86/X86TargetObjectFile.h @@ -23,33 +23,30 @@ namespace llvm { const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, MCStreamer &Streamer) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI, + MCStreamer &Streamer) const override; // getCFIPersonalitySymbol - The symbol that gets passed to // .cfi_personality. MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI) const - LLVM_OVERRIDE; + MachineModuleInfo *MMI) const override; }; /// X86LinuxTargetObjectFile - This implementation is used for linux x86 /// and x86-64. class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF { - void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE; + void Initialize(MCContext &Ctx, const TargetMachine &TM) override; /// \brief Describe a TLS variable address within debug info. - const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const - LLVM_OVERRIDE; + const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; }; /// \brief This implementation is used for Windows targets on x86 and x86-64. class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF { - const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE, - Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; + const MCExpr * + getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang, + const TargetMachine &TM) const override; }; } // end namespace llvm diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index 9c09326ad66..3dbfd741945 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -52,7 +52,7 @@ public: initializeX86TTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -60,7 +60,7 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } @@ -68,7 +68,7 @@ public: static char ID; /// Provide necessary pointer adjustments for the two base classes. - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; @@ -76,45 +76,43 @@ public: /// \name Scalar TTI Implementations /// @{ - virtual PopcntSupportKind - getPopcntSupport(unsigned TyWidth) const LLVM_OVERRIDE; + virtual PopcntSupportKind getPopcntSupport(unsigned TyWidth) const override; /// @} /// \name Vector TTI Implementations /// @{ - virtual unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE; - virtual unsigned getRegisterBitWidth(bool Vector) const LLVM_OVERRIDE; - virtual unsigned getMaximumUnrollFactor() const LLVM_OVERRIDE; + virtual unsigned getNumberOfRegisters(bool Vector) const override; + virtual unsigned getRegisterBitWidth(bool Vector) const override; + virtual unsigned getMaximumUnrollFactor() const override; virtual unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind, - OperandValueKind) const LLVM_OVERRIDE; + OperandValueKind) const override; virtual unsigned getShuffleCost(ShuffleKind Kind, Type *Tp, - int Index, Type *SubTp) const LLVM_OVERRIDE; + int Index, Type *SubTp) const override; virtual unsigned getCastInstrCost(unsigned Opcode, Type *Dst, - Type *Src) const LLVM_OVERRIDE; + Type *Src) const override; virtual unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy) const LLVM_OVERRIDE; + Type *CondTy) const override; virtual unsigned getVectorInstrCost(unsigned Opcode, Type *Val, - unsigned Index) const LLVM_OVERRIDE; + unsigned Index) const override; virtual unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) const LLVM_OVERRIDE; + unsigned AddressSpace) const override; virtual unsigned - getAddressComputationCost(Type *PtrTy, bool IsComplex) const LLVM_OVERRIDE; - + getAddressComputationCost(Type *PtrTy, bool IsComplex) const override; + virtual unsigned getReductionCost(unsigned Opcode, Type *Ty, - bool IsPairwiseForm) const LLVM_OVERRIDE; + bool IsPairwiseForm) const override; - virtual unsigned getIntImmCost(const APInt &Imm, - Type *Ty) const LLVM_OVERRIDE; + virtual unsigned getIntImmCost(const APInt &Imm, Type *Ty) const override; virtual unsigned getIntImmCost(unsigned Opcode, const APInt &Imm, - Type *Ty) const LLVM_OVERRIDE; + Type *Ty) const override; virtual unsigned getIntImmCost(Intrinsic::ID IID, const APInt &Imm, - Type *Ty) const LLVM_OVERRIDE; + Type *Ty) const override; /// @} }; diff --git a/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp b/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp index d535d76854e..439d0ab85e1 100644 --- a/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp +++ b/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp @@ -99,10 +99,10 @@ class XCoreTargetAsmStreamer : public XCoreTargetStreamer { formatted_raw_ostream &OS; public: XCoreTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS); - virtual void emitCCTopData(StringRef Name) LLVM_OVERRIDE; - virtual void emitCCTopFunction(StringRef Name) LLVM_OVERRIDE; - virtual void emitCCBottomData(StringRef Name) LLVM_OVERRIDE; - virtual void emitCCBottomFunction(StringRef Name) LLVM_OVERRIDE; + virtual void emitCCTopData(StringRef Name) override; + virtual void emitCCTopFunction(StringRef Name) override; + virtual void emitCCBottomData(StringRef Name) override; + virtual void emitCCBottomFunction(StringRef Name) override; }; XCoreTargetAsmStreamer::XCoreTargetAsmStreamer(MCStreamer &S, diff --git a/lib/Target/XCore/XCoreTargetObjectFile.h b/lib/Target/XCore/XCoreTargetObjectFile.h index aa345043c0e..733e6d384b0 100644 --- a/lib/Target/XCore/XCoreTargetObjectFile.h +++ b/lib/Target/XCore/XCoreTargetObjectFile.h @@ -24,18 +24,17 @@ static const unsigned CodeModelLargeSize = 256; public: void Initialize(MCContext &Ctx, const TargetMachine &TM); - const MCSection *getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; - - const MCSection *SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const - LLVM_OVERRIDE; - - const MCSection *getSectionForConstant(SectionKind Kind) const - LLVM_OVERRIDE; + const MCSection * + getExplicitSectionGlobal(const GlobalValue *GV, + SectionKind Kind, Mangler &Mang, + const TargetMachine &TM) const override; + + const MCSection * + SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, + Mangler &Mang, + const TargetMachine &TM) const override; + + const MCSection *getSectionForConstant(SectionKind Kind) const override; }; } // end namespace llvm diff --git a/lib/Target/XCore/XCoreTargetTransformInfo.cpp b/lib/Target/XCore/XCoreTargetTransformInfo.cpp index a2b98a7046c..baaf3f7cfff 100644 --- a/lib/Target/XCore/XCoreTargetTransformInfo.cpp +++ b/lib/Target/XCore/XCoreTargetTransformInfo.cpp @@ -42,7 +42,7 @@ public: initializeXCoreTTIPass(*PassRegistry::getPassRegistry()); } - virtual void initializePass() LLVM_OVERRIDE { + virtual void initializePass() override { pushTTIStack(this); } @@ -50,19 +50,19 @@ public: popTTIStack(); } - virtual void getAnalysisUsage(AnalysisUsage &AU) const LLVM_OVERRIDE { + virtual void getAnalysisUsage(AnalysisUsage &AU) const override { TargetTransformInfo::getAnalysisUsage(AU); } static char ID; - virtual void *getAdjustedAnalysisPointer(const void *ID) LLVM_OVERRIDE { + virtual void *getAdjustedAnalysisPointer(const void *ID) override { if (ID == &TargetTransformInfo::ID) return (TargetTransformInfo*)this; return this; } - unsigned getNumberOfRegisters(bool Vector) const LLVM_OVERRIDE { + unsigned getNumberOfRegisters(bool Vector) const override { if (Vector) { return 0; } diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index 351aee058ba..d8ccdda789b 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -149,16 +149,16 @@ namespace { struct AllocaCaptureTracker : public CaptureTracker { AllocaCaptureTracker() : Captured(false) {} - void tooManyUses() LLVM_OVERRIDE { Captured = true; } + void tooManyUses() override { Captured = true; } - bool shouldExplore(Use *U) LLVM_OVERRIDE { + bool shouldExplore(Use *U) override { Value *V = U->getUser(); if (isa(V) || isa(V)) UsesAlloca.insert(V); return true; } - bool captured(Use *U) LLVM_OVERRIDE { + bool captured(Use *U) override { if (isa(U->getUser())) return false; Captured = true; diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp index 120794280d2..2c8afdfbb79 100644 --- a/tools/llvm-readobj/COFFDumper.cpp +++ b/tools/llvm-readobj/COFFDumper.cpp @@ -47,12 +47,12 @@ public: cacheRelocations(); } - virtual void printFileHeaders() LLVM_OVERRIDE; - virtual void printSections() LLVM_OVERRIDE; - virtual void printRelocations() LLVM_OVERRIDE; - virtual void printSymbols() LLVM_OVERRIDE; - virtual void printDynamicSymbols() LLVM_OVERRIDE; - virtual void printUnwindInfo() LLVM_OVERRIDE; + virtual void printFileHeaders() override; + virtual void printSections() override; + virtual void printRelocations() override; + virtual void printSymbols() override; + virtual void printDynamicSymbols() override; + virtual void printUnwindInfo() override; private: void printSymbol(symbol_iterator SymI); diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 59bc2c9c317..adab38fef62 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -42,18 +42,18 @@ public: ELFDumper(const ELFFile *Obj, StreamWriter &Writer) : ObjDumper(Writer), Obj(Obj) {} - virtual void printFileHeaders() LLVM_OVERRIDE; - virtual void printSections() LLVM_OVERRIDE; - virtual void printRelocations() LLVM_OVERRIDE; - virtual void printSymbols() LLVM_OVERRIDE; - virtual void printDynamicSymbols() LLVM_OVERRIDE; - virtual void printUnwindInfo() LLVM_OVERRIDE; - - virtual void printDynamicTable() LLVM_OVERRIDE; - virtual void printNeededLibraries() LLVM_OVERRIDE; - virtual void printProgramHeaders() LLVM_OVERRIDE; - - virtual void printAttributes() LLVM_OVERRIDE; + virtual void printFileHeaders() override; + virtual void printSections() override; + virtual void printRelocations() override; + virtual void printSymbols() override; + virtual void printDynamicSymbols() override; + virtual void printUnwindInfo() override; + + virtual void printDynamicTable() override; + virtual void printNeededLibraries() override; + virtual void printProgramHeaders() override; + + virtual void printAttributes() override; private: typedef ELFFile ELFO; diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index ef699b30bf7..6ff817c25ca 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -30,12 +30,12 @@ public: : ObjDumper(Writer) , Obj(Obj) { } - virtual void printFileHeaders() LLVM_OVERRIDE; - virtual void printSections() LLVM_OVERRIDE; - virtual void printRelocations() LLVM_OVERRIDE; - virtual void printSymbols() LLVM_OVERRIDE; - virtual void printDynamicSymbols() LLVM_OVERRIDE; - virtual void printUnwindInfo() LLVM_OVERRIDE; + virtual void printFileHeaders() override; + virtual void printSections() override; + virtual void printRelocations() override; + virtual void printSymbols() override; + virtual void printDynamicSymbols() override; + virtual void printUnwindInfo() override; private: void printSymbol(symbol_iterator SymI); diff --git a/unittests/Support/CommandLineTest.cpp b/unittests/Support/CommandLineTest.cpp index 4f92fef8b01..b0f1eb1ad6a 100644 --- a/unittests/Support/CommandLineTest.cpp +++ b/unittests/Support/CommandLineTest.cpp @@ -147,7 +147,7 @@ TEST(CommandLineTest, UseOptionCategory) { } class StrDupSaver : public cl::StringSaver { - const char *SaveString(const char *Str) LLVM_OVERRIDE { + const char *SaveString(const char *Str) override { return strdup(Str); } }; -- 2.11.0