[lld] r287620 - Inline small function. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 20:33:01 PST 2016
Author: ruiu
Date: Mon Nov 21 22:33:01 2016
New Revision: 287620
URL: http://llvm.org/viewvc/llvm-project?rev=287620&view=rev
Log:
Inline small function. NFC.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=287620&r1=287619&r2=287620&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Mon Nov 21 22:33:01 2016
@@ -268,16 +268,14 @@ MipsReginfoSection<ELFT> *MipsReginfoSec
return nullptr;
}
-static ArrayRef<uint8_t> createInterp() {
- // StringSaver guarantees that the returned string ends with '\0'.
- StringRef S = Saver.save(Config->DynamicLinker);
- return {(const uint8_t *)S.data(), S.size() + 1};
-}
-
template <class ELFT> InputSection<ELFT> *elf::createInterpSection() {
auto *Ret = make<InputSection<ELFT>>(SHF_ALLOC, SHT_PROGBITS, 1,
- createInterp(), ".interp");
+ ArrayRef<uint8_t>(), ".interp");
Ret->Live = true;
+
+ // StringSaver guarantees that the returned string ends with '\0'.
+ StringRef S = Saver.save(Config->DynamicLinker);
+ Ret->Data = {(const uint8_t *)S.data(), S.size() + 1};
return Ret;
}
More information about the llvm-commits
mailing list