These this-> are there because their classes were templated.
They are no longer templated.
llvm-svn: 234859
break;
}
}
- return new (this->_readerStorage) ARMELFDefinedAtom(
+ return new (_readerStorage) ARMELFDefinedAtom(
*this, symName, sectionName, sym, sectionHdr, contentData,
referenceStart, referenceEnd, referenceList);
}
}
unique_bump_ptr<SymbolTable<ELF32LE>> ARMExecutableWriter::createSymbolTable() {
- return unique_bump_ptr<SymbolTable<ELF32LE>>(new (this->_alloc)
- ARMSymbolTable(this->_ctx));
+ return unique_bump_ptr<SymbolTable<ELF32LE>>(new (_alloc)
+ ARMSymbolTable(_ctx));
}
void ARMExecutableWriter::processUndefinedSymbol(
return ec;
// Set ARM-specific flags.
- this->_elfHeader->e_flags(llvm::ELF::EF_ARM_EABI_VER5 |
- llvm::ELF::EF_ARM_VFP_FLOAT);
+ _elfHeader->e_flags(llvm::ELF::EF_ARM_EABI_VER5 |
+ llvm::ELF::EF_ARM_VFP_FLOAT);
StringRef entryName = _ctx.entrySymbolName();
if (const AtomLayout *al = _armLayout.findAtomLayoutByName(entryName)) {
break;
case DefinedAtom::codeARMThumb:
// Fixup entry point for Thumb code.
- this->_elfHeader->e_entry(al->_virtualAddr | 0x1);
+ _elfHeader->e_entry(al->_virtualAddr | 0x1);
break;
default:
llvm_unreachable("Wrong code model of entry point atom");
uint64_t getGOTSymAddr() {
std::call_once(_gotSymOnce, [this]() {
- if (AtomLayout *gotAtom = this->findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_"))
+ if (AtomLayout *gotAtom = findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_"))
_gotSymAddr = gotAtom->_virtualAddr;
});
return _gotSymAddr;
uint64_t getTPOffset() {
std::call_once(_tpOffOnce, [this]() {
- for (const auto &phdr : *this->_programHeader) {
+ for (const auto &phdr : *_programHeader) {
if (phdr->p_type == llvm::ELF::PT_TLS) {
_tpOff = llvm::RoundUpToAlignment(TCB_SIZE, phdr->p_align);
break;
return _tpOff;
}
- bool target1Rel() const { return this->_ctx.armTarget1Rel(); }
+ bool target1Rel() const { return _ctx.armTarget1Rel(); }
private:
// TCB block size of the TLS.
std::error_code setELFHeader() override {
DynamicLibraryWriter<ELF32LE>::setELFHeader();
- setHexagonELFHeader(*this->_elfHeader);
+ setHexagonELFHeader(*_elfHeader);
return std::error_code();
}
: ELFDefinedAtom<ELF32LE>(std::forward<T>(args)...) {}
DefinedAtom::ContentType contentType() const override {
- if (this->_contentType != DefinedAtom::typeUnknown)
- return this->_contentType;
- if (this->_section->sh_flags & llvm::ELF::SHF_HEX_GPREL) {
- if (this->_section->sh_type == llvm::ELF::SHT_NOBITS)
- return (this->_contentType = DefinedAtom::typeZeroFillFast);
- return (this->_contentType = DefinedAtom::typeDataFast);
+ if (_contentType != DefinedAtom::typeUnknown)
+ return _contentType;
+ if (_section->sh_flags & llvm::ELF::SHF_HEX_GPREL) {
+ if (_section->sh_type == llvm::ELF::SHT_NOBITS)
+ return (_contentType = DefinedAtom::typeZeroFillFast);
+ return (_contentType = DefinedAtom::typeDataFast);
}
return ELFDefinedAtom<ELF32LE>::contentType();
}
DefinedAtom::ContentPermissions permissions() const override {
- if (this->_section->sh_flags & llvm::ELF::SHF_HEX_GPREL)
+ if (_section->sh_flags & llvm::ELF::SHF_HEX_GPREL)
return DefinedAtom::permRW_;
return ELFDefinedAtom<ELF32LE>::permissions();
}
: ELFCommonAtom<ELF32LE>(file, symbolName, symbol) {}
virtual bool isSmallCommonSymbol() const {
- switch (this->_symbol->st_shndx) {
+ switch (_symbol->st_shndx) {
// Common symbols
case llvm::ELF::SHN_HEXAGON_SCOMMON:
case llvm::ELF::SHN_HEXAGON_SCOMMON_1:
uint64_t size() const override {
if (isSmallCommonSymbol())
- return this->_symbol->st_size;
+ return _symbol->st_size;
return ELFCommonAtom<ELF32LE>::size();
}
DefinedAtom::Merge merge() const override {
- if (this->_symbol->getBinding() == llvm::ELF::STB_WEAK)
+ if (_symbol->getBinding() == llvm::ELF::STB_WEAK)
return DefinedAtom::mergeAsWeak;
if (isSmallCommonSymbol())
return DefinedAtom::mergeAsTentative;
DefinedAtom::Alignment alignment() const override {
if (isSmallCommonSymbol())
- return DefinedAtom::Alignment(this->_symbol->st_value);
+ return DefinedAtom::Alignment(_symbol->st_value);
return 1;
}
std::error_code setELFHeader() override {
ExecutableWriter<ELF32LE>::setELFHeader();
- setHexagonELFHeader(*this->_elfHeader);
+ setHexagonELFHeader(*_elfHeader);
return std::error_code();
}
auto file =
llvm::make_unique<RuntimeFile<ELF32LE>>(_ctx, "Hexagon runtime file");
file->addAbsoluteAtom("_SDA_BASE_");
- if (this->_ctx.isDynamic()) {
+ if (_ctx.isDynamic()) {
file->addAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
file->addAbsoluteAtom("_DYNAMIC");
}
uint64_t getGOTSymAddr() {
std::call_once(_gotOnce, [this]() {
- if (AtomLayout *got = this->findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_"))
+ if (AtomLayout *got = findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_"))
_gotAddr = got->_virtualAddr;
});
return _gotAddr;
inline void SDataSection::doPreFlight() {
// sort the atoms on the alignments they have been set
- std::stable_sort(this->_atoms.begin(), this->_atoms.end(),
- [](const lld::AtomLayout * A,
- const lld::AtomLayout * B) {
+ std::stable_sort(_atoms.begin(), _atoms.end(), [](const lld::AtomLayout *A,
+ const lld::AtomLayout *B) {
const DefinedAtom *definedAtomA = cast<DefinedAtom>(A->_atom);
const DefinedAtom *definedAtomB = cast<DefinedAtom>(B->_atom);
int64_t alignmentA = definedAtomA->alignment().value;
});
// Set the fileOffset, and the appropriate size of the section
- for (auto &ai : this->_atoms) {
+ for (auto &ai : _atoms) {
const DefinedAtom *definedAtom = cast<DefinedAtom>(ai->_atom);
DefinedAtom::Alignment atomAlign = definedAtom->alignment();
- uint64_t fOffset = this->alignOffset(this->fileSize(), atomAlign);
- uint64_t mOffset = this->alignOffset(this->memSize(), atomAlign);
+ uint64_t fOffset = alignOffset(fileSize(), atomAlign);
+ uint64_t mOffset = alignOffset(memSize(), atomAlign);
ai->_fileOffset = fOffset;
- this->_fsize = fOffset + definedAtom->size();
- this->_msize = mOffset + definedAtom->size();
+ _fsize = fOffset + definedAtom->size();
+ _msize = mOffset + definedAtom->size();
}
} // finalize
inline SDataSection::SDataSection(const HexagonLinkingContext &ctx)
: AtomSection<ELF32LE>(ctx, ".sdata", DefinedAtom::typeDataFast, 0,
HexagonTargetLayout::ORDER_SDATA) {
- this->_type = SHT_PROGBITS;
- this->_flags = SHF_ALLOC | SHF_WRITE;
- this->_alignment = 4096;
+ _type = SHT_PROGBITS;
+ _flags = SHF_ALLOC | SHF_WRITE;
+ _alignment = 4096;
}
inline const lld::AtomLayout *SDataSection::appendAtom(const Atom *atom) {
const DefinedAtom *definedAtom = cast<DefinedAtom>(atom);
DefinedAtom::Alignment atomAlign = definedAtom->alignment();
uint64_t alignment = atomAlign.value;
- this->_atoms.push_back(new (this->_alloc) lld::AtomLayout(atom, 0, 0));
+ _atoms.push_back(new (_alloc) lld::AtomLayout(atom, 0, 0));
// Set the section alignment to the largest alignment
// std::max doesn't support uint64_t
- if (this->_alignment < alignment)
- this->_alignment = alignment;
- return (this->_atoms.back());
+ if (_alignment < alignment)
+ _alignment = alignment;
+ return _atoms.back();
}
inline void finalizeHexagonRuntimeAtomValues(HexagonTargetLayout &layout) {