[lld] r233735 - Remove virtual and add override.
Rui Ueyama
ruiu at google.com
Tue Mar 31 12:21:43 PDT 2015
Author: ruiu
Date: Tue Mar 31 14:21:43 2015
New Revision: 233735
URL: http://llvm.org/viewvc/llvm-project?rev=233735&view=rev
Log:
Remove virtual and add override.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h?rev=233735&r1=233734&r2=233735&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h Tue Mar 31 14:21:43 2015
@@ -26,18 +26,18 @@ public:
protected:
// Add any runtime files and their atoms to the output
- virtual bool createImplicitFiles(std::vector<std::unique_ptr<File>> &);
+ bool createImplicitFiles(std::vector<std::unique_ptr<File>> &) override;
- virtual void finalizeDefaultAtomValues();
+ void finalizeDefaultAtomValues() override;
- virtual std::error_code setELFHeader() {
+ std::error_code setELFHeader() override {
DynamicLibraryWriter<ELFT>::setELFHeader();
setHexagonELFHeader(*this->_elfHeader);
return std::error_code();
}
private:
- void addDefaultAtoms() {
+ void addDefaultAtoms() override {
_hexagonRuntimeFile->addAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
_hexagonRuntimeFile->addAbsoluteAtom("_DYNAMIC");
}
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h?rev=233735&r1=233734&r2=233735&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h Tue Mar 31 14:21:43 2015
@@ -28,7 +28,7 @@ public:
HexagonELFDefinedAtom(T&&... args)
: ELFDefinedAtom<ELFT>(std::forward<T>(args)...) {}
- virtual DefinedAtom::ContentType contentType() const {
+ DefinedAtom::ContentType contentType() const override {
if (this->_contentType != DefinedAtom::typeUnknown)
return this->_contentType;
else if (this->_section->sh_flags & llvm::ELF::SHF_HEX_GPREL) {
@@ -40,7 +40,7 @@ public:
return ELFDefinedAtom<ELFT>::contentType();
}
- virtual DefinedAtom::ContentPermissions permissions() const {
+ DefinedAtom::ContentPermissions permissions() const override {
if (this->_section->sh_flags & llvm::ELF::SHF_HEX_GPREL)
return DefinedAtom::permRW_;
return ELFDefinedAtom<ELFT>::permissions();
@@ -71,13 +71,13 @@ public:
return false;
}
- virtual uint64_t size() const {
+ uint64_t size() const override {
if (isSmallCommonSymbol())
return this->_symbol->st_size;
return ELFCommonAtom<ELFT>::size();
}
- virtual DefinedAtom::Merge merge() const {
+ DefinedAtom::Merge merge() const override {
if (this->_symbol->getBinding() == llvm::ELF::STB_WEAK)
return DefinedAtom::mergeAsWeak;
if (isSmallCommonSymbol())
@@ -85,19 +85,19 @@ public:
return ELFCommonAtom<ELFT>::merge();
}
- virtual DefinedAtom::ContentType contentType() const {
+ DefinedAtom::ContentType contentType() const override {
if (isSmallCommonSymbol())
return DefinedAtom::typeZeroFillFast;
return ELFCommonAtom<ELFT>::contentType();
}
- virtual DefinedAtom::Alignment alignment() const {
+ DefinedAtom::Alignment alignment() const override {
if (isSmallCommonSymbol())
return DefinedAtom::Alignment(this->_symbol->st_value);
return 1;
}
- virtual DefinedAtom::ContentPermissions permissions() const {
+ DefinedAtom::ContentPermissions permissions() const override {
if (isSmallCommonSymbol())
return DefinedAtom::permRW_;
return ELFCommonAtom<ELFT>::permissions();
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h?rev=233735&r1=233734&r2=233735&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h Tue Mar 31 14:21:43 2015
@@ -26,18 +26,18 @@ public:
protected:
// Add any runtime files and their atoms to the output
- virtual bool createImplicitFiles(std::vector<std::unique_ptr<File>> &);
+ bool createImplicitFiles(std::vector<std::unique_ptr<File>> &) override;
- virtual void finalizeDefaultAtomValues();
+ void finalizeDefaultAtomValues() override;
- virtual std::error_code setELFHeader() {
+ std::error_code setELFHeader() override {
ExecutableWriter<ELFT>::setELFHeader();
setHexagonELFHeader(*this->_elfHeader);
return std::error_code();
}
private:
- void addDefaultAtoms() {
+ void addDefaultAtoms() override {
_hexagonRuntimeFile->addAbsoluteAtom("_SDA_BASE_");
if (this->_ctx.isDynamic()) {
_hexagonRuntimeFile->addAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h?rev=233735&r1=233734&r2=233735&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h Tue Mar 31 14:21:43 2015
@@ -36,8 +36,8 @@ public:
}
/// \brief Return the section order for a input section
- virtual Layout::SectionOrder getSectionOrder(
- StringRef name, int32_t contentType, int32_t contentPermissions) {
+ Layout::SectionOrder getSectionOrder(
+ StringRef name, int32_t contentType, int32_t contentPermissions) override {
if ((contentType == DefinedAtom::typeDataFast) ||
(contentType == DefinedAtom::typeZeroFillFast))
return ORDER_SDATA;
@@ -47,7 +47,7 @@ public:
}
/// \brief Return the appropriate input section name.
- virtual StringRef getInputSectionName(const DefinedAtom *da) const {
+ StringRef getInputSectionName(const DefinedAtom *da) const override {
switch (da->contentType()) {
case DefinedAtom::typeDataFast:
case DefinedAtom::typeZeroFillFast:
@@ -59,10 +59,10 @@ public:
}
/// \brief Gets or creates a section.
- virtual AtomSection<HexagonELFType> *
+ AtomSection<HexagonELFType> *
createSection(StringRef name, int32_t contentType,
DefinedAtom::ContentPermissions contentPermissions,
- Layout::SectionOrder sectionOrder) {
+ Layout::SectionOrder sectionOrder) override {
if ((contentType == DefinedAtom::typeDataFast) ||
(contentType == DefinedAtom::typeZeroFillFast))
return _sdataSection;
@@ -71,8 +71,8 @@ public:
}
/// \brief get the segment type for the section thats defined by the target
- virtual Layout::SegmentType
- getSegmentType(Section<HexagonELFType> *section) const {
+ Layout::SegmentType
+ getSegmentType(Section<HexagonELFType> *section) const override {
if (section->order() == ORDER_SDATA)
return PT_LOAD;
More information about the llvm-commits
mailing list