[lld] r233218 - Inherit constructors. No functionality change.

Rui Ueyama ruiu at google.com
Wed Mar 25 14:20:11 PDT 2015


Author: ruiu
Date: Wed Mar 25 16:20:11 2015
New Revision: 233218

URL: http://llvm.org/viewvc/llvm-project?rev=233218&view=rev
Log:
Inherit constructors. No functionality change.

We cannot use "using" to inherit constructors because the feature
is not supported by MSVC 2013.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h

Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h?rev=233218&r1=233217&r2=233218&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMELFFile.h Wed Mar 25 16:20:11 2015
@@ -22,14 +22,9 @@ template <class ELFT> class ARMELFDefine
   typedef llvm::object::Elf_Shdr_Impl<ELFT> Elf_Shdr;
 
 public:
-  ARMELFDefinedAtom(const ELFFile<ELFT> &file, StringRef symbolName,
-                 StringRef sectionName, const Elf_Sym *symbol,
-                 const Elf_Shdr *section, ArrayRef<uint8_t> contentData,
-                 unsigned int referenceStart, unsigned int referenceEnd,
-                 std::vector<ELFReference<ELFT> *> &referenceList)
-      : ELFDefinedAtom<ELFT>(file, symbolName, sectionName, symbol, section,
-                             contentData, referenceStart, referenceEnd,
-                             referenceList) {}
+  template<typename... T>
+  ARMELFDefinedAtom(T&&... args)
+      : ELFDefinedAtom<ELFT>(std::forward<T>(args)...) {}
 
   bool isThumbFunc(const Elf_Sym *symbol) const {
     return symbol->getType() == llvm::ELF::STT_FUNC &&

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=233218&r1=233217&r2=233218&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h Wed Mar 25 16:20:11 2015
@@ -24,14 +24,9 @@ class HexagonELFDefinedAtom : public ELF
   typedef llvm::object::Elf_Shdr_Impl<ELFT> Elf_Shdr;
 
 public:
-  HexagonELFDefinedAtom(const HexagonELFFile<ELFT> &file, StringRef symbolName,
-                        StringRef sectionName, const Elf_Sym *symbol,
-                        const Elf_Shdr *section, ArrayRef<uint8_t> contentData,
-                        unsigned int referenceStart, unsigned int referenceEnd,
-                        std::vector<ELFReference<ELFT> *> &referenceList)
-      : ELFDefinedAtom<ELFT>(file, symbolName, sectionName, symbol, section,
-                             contentData, referenceStart, referenceEnd,
-                             referenceList) {}
+  template<typename... T>
+  HexagonELFDefinedAtom(T&&... args)
+      : ELFDefinedAtom<ELFT>(std::forward<T>(args)...) {}
 
   virtual DefinedAtom::ContentType contentType() const {
     if (this->_contentType != DefinedAtom::typeUnknown)





More information about the llvm-commits mailing list