mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-14 03:45:33 +00:00
[ELF] - Detemplate InputSectionBase::uncompress(). NFC
llvm-svn: 298351
This commit is contained in:
parent
90a528ba7a
commit
76e562ab1b
@ -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();
|
||||
});
|
||||
|
@ -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>();
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user