Inline small function. NFC.

llvm-svn: 287620
This commit is contained in:
Rui Ueyama 2016-11-22 04:33:01 +00:00
parent 9b106ea072
commit 81a4b26b48
1 changed files with 5 additions and 7 deletions

View File

@ -268,16 +268,14 @@ MipsReginfoSection<ELFT> *MipsReginfoSection<ELFT>::create() {
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;
}