diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 1cfe358c8572..aae750768d16 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -217,8 +217,6 @@ findSection(ArrayRef *> V, StringRef Name) { template void LinkerScript::assignAddresses( ArrayRef *> Sections) { - typedef typename ELFT::uint uintX_t; - // Orphan sections are sections present in the input files which // are not explicitly placed into the output file by the linker script. // We place orphan sections at end of file. diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h index 25c668fe7792..a05787d436a2 100644 --- a/lld/ELF/LinkerScript.h +++ b/lld/ELF/LinkerScript.h @@ -75,6 +75,8 @@ extern ScriptConfiguration *ScriptConfig; // This is a runner of the linker script. template class LinkerScript { + typedef typename ELFT::uint uintX_t; + public: StringRef getOutputSection(InputSectionBase *S); ArrayRef getFiller(StringRef Name); @@ -94,7 +96,7 @@ private: uint64_t parsePrimary(ArrayRef &Tokens); uint64_t parseExpr1(ArrayRef &Tokens, uint64_t Lhs, int MinPrec); uint64_t parseTernary(ArrayRef &Tokens, uint64_t Cond); - typename ELFT::uint Dot; + uintX_t Dot; }; // Variable template is a C++14 feature, so we can't template