No functional changes.
llvm-svn: 226256
private:
MipsELFWriter<ELFT> _writeHelper;
- MipsLinkingContext &_mipsContext;
MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;
};
MipsDynamicLibraryWriter<ELFT>::MipsDynamicLibraryWriter(
MipsLinkingContext &ctx, MipsTargetLayout<ELFT> &layout)
: DynamicLibraryWriter<ELFT>(ctx, layout), _writeHelper(ctx, layout),
- _mipsContext(ctx), _mipsTargetLayout(layout) {}
+ _mipsTargetLayout(layout) {}
template <class ELFT>
bool MipsDynamicLibraryWriter<ELFT>::createImplicitFiles(
LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)
MipsDynamicLibraryWriter<ELFT>::createSymbolTable() {
return LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)(new (
- this->_alloc) MipsSymbolTable<ELFT>(_mipsContext));
+ this->_alloc) MipsSymbolTable<ELFT>(this->_context));
}
/// \brief create dynamic table
LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)
MipsDynamicLibraryWriter<ELFT>::createDynamicTable() {
return LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)(new (
- this->_alloc) MipsDynamicTable<ELFT>(_mipsContext, _mipsTargetLayout));
+ this->_alloc) MipsDynamicTable<ELFT>(this->_context, _mipsTargetLayout));
}
/// \brief create dynamic symbol table
MipsDynamicLibraryWriter<ELFT>::createDynamicSymbolTable() {
return LLD_UNIQUE_BUMP_PTR(
DynamicSymbolTable<ELFT>)(new (this->_alloc) MipsDynamicSymbolTable<ELFT>(
- _mipsContext, _mipsTargetLayout));
+ this->_context, _mipsTargetLayout));
}
} // namespace elf
namespace lld {
namespace elf {
-class MipsLinkingContext;
template <class ELFType> class MipsTargetLayout;
template <class MipsELFType>
class MipsDynamicTable : public DynamicTable<MipsELFType> {
public:
- MipsDynamicTable(MipsLinkingContext &ctx,
+ MipsDynamicTable(const ELFLinkingContext &ctx,
MipsTargetLayout<MipsELFType> &layout)
: DynamicTable<MipsELFType>(ctx, layout, ".dynamic",
DefaultLayout<MipsELFType>::ORDER_DYNAMIC),
private:
MipsELFWriter<ELFT> _writeHelper;
- MipsLinkingContext &_mipsContext;
MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;
};
MipsExecutableWriter<ELFT>::MipsExecutableWriter(MipsLinkingContext &ctx,
MipsTargetLayout<ELFT> &layout)
: ExecutableWriter<ELFT>(ctx, layout), _writeHelper(ctx, layout),
- _mipsContext(ctx), _mipsTargetLayout(layout) {}
+ _mipsTargetLayout(layout) {}
template <class ELFT>
std::error_code MipsExecutableWriter<ELFT>::setELFHeader() {
if (ec)
return ec;
- StringRef entryName = _mipsContext.entrySymbolName();
+ StringRef entryName = this->_context.entrySymbolName();
if (const AtomLayout *al = this->_layout.findAtomLayoutByName(entryName)) {
const auto *ea = cast<DefinedAtom>(al->_atom);
if (ea->codeModel() == DefinedAtom::codeMipsMicro ||
LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)
MipsExecutableWriter<ELFT>::createSymbolTable() {
return LLD_UNIQUE_BUMP_PTR(SymbolTable<ELFT>)(new (
- this->_alloc) MipsSymbolTable<ELFT>(_mipsContext));
+ this->_alloc) MipsSymbolTable<ELFT>(this->_context));
}
/// \brief create dynamic table
LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)
MipsExecutableWriter<ELFT>::createDynamicTable() {
return LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>)(new (
- this->_alloc) MipsDynamicTable<ELFT>(_mipsContext, _mipsTargetLayout));
+ this->_alloc) MipsDynamicTable<ELFT>(this->_context, _mipsTargetLayout));
}
/// \brief create dynamic symbol table
MipsExecutableWriter<ELFT>::createDynamicSymbolTable() {
return LLD_UNIQUE_BUMP_PTR(
DynamicSymbolTable<ELFT>)(new (this->_alloc) MipsDynamicSymbolTable<ELFT>(
- _mipsContext, _mipsTargetLayout));
+ this->_context, _mipsTargetLayout));
}
} // namespace elf
public:
typedef llvm::object::Elf_Sym_Impl<ELFT> Elf_Sym;
- MipsSymbolTable(const MipsLinkingContext &ctx)
+ MipsSymbolTable(const ELFLinkingContext &ctx)
: SymbolTable<ELFT>(ctx, ".symtab",
DefaultLayout<ELFT>::ORDER_SYMBOL_TABLE) {}
template <class ELFT>
class MipsDynamicSymbolTable : public DynamicSymbolTable<ELFT> {
public:
- MipsDynamicSymbolTable(const MipsLinkingContext &ctx,
+ MipsDynamicSymbolTable(const ELFLinkingContext &ctx,
MipsTargetLayout<ELFT> &layout)
: DynamicSymbolTable<ELFT>(ctx, layout, ".dynsym",
DefaultLayout<ELFT>::ORDER_DYNAMIC_SYMBOLS),