Index: lib/ReaderWriter/ELF/AArch64/AArch64ELFFile.h =================================================================== --- lib/ReaderWriter/ELF/AArch64/AArch64ELFFile.h +++ lib/ReaderWriter/ELF/AArch64/AArch64ELFFile.h @@ -19,8 +19,7 @@ template class AArch64ELFFile : public ELFFile { public: - AArch64ELFFile(std::unique_ptr mb, AArch64LinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, AArch64LinkingContext &ctx) { @@ -31,8 +30,7 @@ template class AArch64DynamicFile : public DynamicFile { public: - AArch64DynamicFile(const AArch64LinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf Index: lib/ReaderWriter/ELF/ARM/ARMELFFile.h =================================================================== --- lib/ReaderWriter/ELF/ARM/ARMELFFile.h +++ lib/ReaderWriter/ELF/ARM/ARMELFFile.h @@ -22,14 +22,7 @@ typedef llvm::object::Elf_Shdr_Impl Elf_Shdr; public: - ARMELFDefinedAtom(const ELFFile &file, StringRef symbolName, - StringRef sectionName, const Elf_Sym *symbol, - const Elf_Shdr *section, ArrayRef contentData, - unsigned int referenceStart, unsigned int referenceEnd, - std::vector *> &referenceList) - : ELFDefinedAtom(file, symbolName, sectionName, symbol, section, - contentData, referenceStart, referenceEnd, - referenceList) {} + using ELFDefinedAtom::ELFDefinedAtom; bool isThumbFunc(const Elf_Sym *symbol) const { return symbol->getType() == llvm::ELF::STT_FUNC && @@ -52,8 +45,7 @@ template class ARMELFFile : public ELFFile { public: - ARMELFFile(std::unique_ptr mb, ARMLinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, ARMLinkingContext &ctx) { @@ -87,8 +79,7 @@ template class ARMDynamicFile : public DynamicFile { public: - ARMDynamicFile(const ARMLinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf Index: lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp =================================================================== --- lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp +++ lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp @@ -83,8 +83,7 @@ /// ARM B/BL instructions. class Veneer_ARM_B_BL_StaticAtom : public VeneerAtom { public: - Veneer_ARM_B_BL_StaticAtom(const File &f, StringRef secName) - : VeneerAtom(f, secName) {} + using VeneerAtom::VeneerAtom; ArrayRef rawContent() const override { return llvm::makeArrayRef(Veneer_ARM_B_BL_StaticAtomContent); @@ -95,8 +94,7 @@ /// Thumb B/BL instructions. class Veneer_THM_B_BL_StaticAtom : public VeneerAtom { public: - Veneer_THM_B_BL_StaticAtom(const File &f, StringRef secName) - : VeneerAtom(f, secName) {} + using VeneerAtom::VeneerAtom; DefinedAtom::CodeModel codeModel() const override { return DefinedAtom::codeARMThumb; @@ -110,7 +108,7 @@ /// \brief Atoms that are used by ARM dynamic linking class ARMGOTAtom : public GOTAtom { public: - ARMGOTAtom(const File &f, StringRef secName) : GOTAtom(f, secName) {} + using GOTAtom::GOTAtom; ArrayRef rawContent() const override { return llvm::makeArrayRef(ARMGotAtomContent); Index: lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h =================================================================== --- lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h +++ lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h @@ -24,14 +24,7 @@ typedef llvm::object::Elf_Shdr_Impl Elf_Shdr; public: - HexagonELFDefinedAtom(const HexagonELFFile &file, StringRef symbolName, - StringRef sectionName, const Elf_Sym *symbol, - const Elf_Shdr *section, ArrayRef contentData, - unsigned int referenceStart, unsigned int referenceEnd, - std::vector *> &referenceList) - : ELFDefinedAtom(file, symbolName, sectionName, symbol, section, - contentData, referenceStart, referenceEnd, - referenceList) {} + using ELFDefinedAtom::ELFDefinedAtom; virtual DefinedAtom::ContentType contentType() const { if (this->_contentType != DefinedAtom::typeUnknown) @@ -57,9 +50,7 @@ typedef llvm::object::Elf_Shdr_Impl Elf_Shdr; public: - HexagonELFCommonAtom(const HexagonELFFile &file, StringRef symbolName, - const Elf_Sym *symbol) - : ELFCommonAtom(file, symbolName, symbol) {} + using ELFCommonAtom::ELFCommonAtom; virtual bool isSmallCommonSymbol() const { switch (this->_symbol->st_shndx) { @@ -114,8 +105,7 @@ typedef llvm::object::Elf_Shdr_Impl Elf_Shdr; public: - HexagonELFFile(std::unique_ptr mb, HexagonLinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, HexagonLinkingContext &ctx) { @@ -160,8 +150,7 @@ template class HexagonDynamicFile : public DynamicFile { public: - HexagonDynamicFile(const HexagonLinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf Index: lib/ReaderWriter/ELF/Mips/MipsELFFile.h =================================================================== --- lib/ReaderWriter/ELF/Mips/MipsELFFile.h +++ lib/ReaderWriter/ELF/Mips/MipsELFFile.h @@ -60,14 +60,7 @@ typedef llvm::object::Elf_Shdr_Impl Elf_Shdr; public: - MipsELFDefinedAtom(const MipsELFFile &file, StringRef symbolName, - StringRef sectionName, const Elf_Sym *symbol, - const Elf_Shdr *section, ArrayRef contentData, - unsigned int referenceStart, unsigned int referenceEnd, - std::vector *> &referenceList) - : ELFDefinedAtom(file, symbolName, sectionName, symbol, section, - contentData, referenceStart, referenceEnd, - referenceList) {} + using ELFDefinedAtom::ELFDefinedAtom; const MipsELFFile& file() const override { return static_cast &>(this->_owningFile); @@ -122,8 +115,7 @@ template class MipsELFFile : public ELFFile { public: - MipsELFFile(std::unique_ptr mb, MipsLinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, MipsLinkingContext &ctx) { @@ -325,8 +317,7 @@ template class MipsDynamicFile : public DynamicFile { public: - MipsDynamicFile(const MipsLinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf Index: lib/ReaderWriter/ELF/X86/X86ELFFile.h =================================================================== --- lib/ReaderWriter/ELF/X86/X86ELFFile.h +++ lib/ReaderWriter/ELF/X86/X86ELFFile.h @@ -19,8 +19,7 @@ template class X86ELFFile : public ELFFile { public: - X86ELFFile(std::unique_ptr mb, X86LinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, X86LinkingContext &ctx) { @@ -31,8 +30,7 @@ template class X86DynamicFile : public DynamicFile { public: - X86DynamicFile(const X86LinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf Index: lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h =================================================================== --- lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h +++ lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h @@ -19,8 +19,7 @@ template class X86_64ELFFile : public ELFFile { public: - X86_64ELFFile(std::unique_ptr mb, X86_64LinkingContext &ctx) - : ELFFile(std::move(mb), ctx) {} + using ELFFile::ELFFile; static ErrorOr> create(std::unique_ptr mb, X86_64LinkingContext &ctx) { @@ -31,8 +30,7 @@ template class X86_64DynamicFile : public DynamicFile { public: - X86_64DynamicFile(const X86_64LinkingContext &context, StringRef name) - : DynamicFile(context, name) {} + using DynamicFile::DynamicFile; }; } // elf