Skip to content

Commit

Permalink
Inline small function. NFC.
Browse files Browse the repository at this point in the history
llvm-svn: 287620
  • Loading branch information
rui314 committed Nov 22, 2016
1 parent 9b106ea commit 81a4b26
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lld/ELF/SyntheticSections.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 81a4b26

Please sign in to comment.