[ELF] - Detemplate InputSectionBase::uncompress(). NFC

llvm-svn: 298351
This commit is contained in:
George Rimar 2017-03-21 09:08:58 +00:00
parent 90a528ba7a
commit 76e562ab1b
3 changed files with 4 additions and 10 deletions

View File

@ -929,7 +929,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
if (!S->Live)
return;
if (Decompressor::isCompressedELFSection(S->Flags, S->Name))
S->uncompress<ELFT>();
S->uncompress();
if (auto *MS = dyn_cast<MergeInputSection>(S))
MS->splitIntoPieces();
});

View File

@ -139,10 +139,9 @@ OutputSection *SectionBase::getOutputSection() {
// Uncompress section contents. Note that this function is called
// from parallel_for_each, so it must be thread-safe.
template <class ELFT> void InputSectionBase::uncompress() {
void InputSectionBase::uncompress() {
Decompressor Dec = check(Decompressor::create(
Name, toStringRef(Data), ELFT::TargetEndianness == llvm::support::little,
ELFT::Is64Bits));
Name, toStringRef(Data), Config->IsLE, Config->Wordsize == 8));
size_t Size = Dec.getDecompressedSize();
char *OutputBuf;
@ -824,11 +823,6 @@ template void InputSection::writeTo<ELF32BE>(uint8_t *Buf);
template void InputSection::writeTo<ELF64LE>(uint8_t *Buf);
template void InputSection::writeTo<ELF64BE>(uint8_t *Buf);
template void InputSectionBase::uncompress<ELF32LE>();
template void InputSectionBase::uncompress<ELF32BE>();
template void InputSectionBase::uncompress<ELF64LE>();
template void InputSectionBase::uncompress<ELF64BE>();
template InputSectionBase *InputSection::getRelocatedSection<ELF32LE>();
template InputSectionBase *InputSection::getRelocatedSection<ELF32BE>();
template InputSectionBase *InputSection::getRelocatedSection<ELF64LE>();

View File

@ -159,7 +159,7 @@ public:
InputSectionBase *getLinkOrderDep() const;
template <class ELFT> void uncompress();
void uncompress();
// Returns a source location string. Used to construct an error message.
template <class ELFT> std::string getLocation(uint64_t Offset);