forked from OSchip/llvm-project
[ELF] Remove unused xxxWriter class fields
llvm-svn: 234357
This commit is contained in:
parent
073e9fb5e1
commit
3dba8a2d96
|
@ -34,15 +34,12 @@ private:
|
|||
};
|
||||
|
||||
std::unique_ptr<GOTFile> _gotFile;
|
||||
AArch64LinkingContext &_ctx;
|
||||
TargetLayout<ELFT> &_layout;
|
||||
};
|
||||
|
||||
template <class ELFT>
|
||||
AArch64DynamicLibraryWriter<ELFT>::AArch64DynamicLibraryWriter(
|
||||
AArch64LinkingContext &ctx, TargetLayout<ELFT> &layout)
|
||||
: DynamicLibraryWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)),
|
||||
_ctx(ctx), _layout(layout) {}
|
||||
: DynamicLibraryWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)) {}
|
||||
|
||||
template <class ELFT>
|
||||
void AArch64DynamicLibraryWriter<ELFT>::createImplicitFiles(
|
||||
|
|
|
@ -33,22 +33,19 @@ private:
|
|||
};
|
||||
|
||||
std::unique_ptr<GOTFile> _gotFile;
|
||||
AArch64LinkingContext &_ctx;
|
||||
TargetLayout<ELFT> &_layout;
|
||||
};
|
||||
|
||||
template <class ELFT>
|
||||
AArch64ExecutableWriter<ELFT>::AArch64ExecutableWriter(
|
||||
AArch64LinkingContext &ctx, TargetLayout<ELFT> &layout)
|
||||
: ExecutableWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)),
|
||||
_ctx(ctx), _layout(layout) {}
|
||||
: ExecutableWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)) {}
|
||||
|
||||
template <class ELFT>
|
||||
void AArch64ExecutableWriter<ELFT>::createImplicitFiles(
|
||||
std::vector<std::unique_ptr<File>> &result) {
|
||||
ExecutableWriter<ELFT>::createImplicitFiles(result);
|
||||
_gotFile->addAtom(*new (_gotFile->_alloc) GlobalOffsetTableAtom(*_gotFile));
|
||||
if (_ctx.isDynamic())
|
||||
if (this->_ctx.isDynamic())
|
||||
_gotFile->addAtom(*new (_gotFile->_alloc) DynamicAtom(*_gotFile));
|
||||
result.push_back(std::move(_gotFile));
|
||||
}
|
||||
|
|
|
@ -32,15 +32,12 @@ private:
|
|||
};
|
||||
|
||||
std::unique_ptr<GOTFile> _gotFile;
|
||||
X86LinkingContext &_ctx;
|
||||
TargetLayout<ELFT> &_layout;
|
||||
};
|
||||
|
||||
template <class ELFT>
|
||||
X86DynamicLibraryWriter<ELFT>::X86DynamicLibraryWriter(
|
||||
X86LinkingContext &ctx, TargetLayout<ELFT> &layout)
|
||||
: DynamicLibraryWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)),
|
||||
_ctx(ctx), _layout(layout) {}
|
||||
: DynamicLibraryWriter<ELFT>(ctx, layout), _gotFile(new GOTFile(ctx)) {}
|
||||
|
||||
template <class ELFT>
|
||||
void X86DynamicLibraryWriter<ELFT>::createImplicitFiles(
|
||||
|
|
|
@ -23,16 +23,12 @@ public:
|
|||
protected:
|
||||
// Add any runtime files and their atoms to the output
|
||||
void createImplicitFiles(std::vector<std::unique_ptr<File>> &) override;
|
||||
|
||||
private:
|
||||
X86LinkingContext &_ctx;
|
||||
TargetLayout<ELFT> &_layout;
|
||||
};
|
||||
|
||||
template <class ELFT>
|
||||
X86ExecutableWriter<ELFT>::X86ExecutableWriter(X86LinkingContext &ctx,
|
||||
TargetLayout<ELFT> &layout)
|
||||
: ExecutableWriter<ELFT>(ctx, layout), _ctx(ctx), _layout(layout) {}
|
||||
: ExecutableWriter<ELFT>(ctx, layout) {}
|
||||
|
||||
template <class ELFT>
|
||||
void X86ExecutableWriter<ELFT>::createImplicitFiles(
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace elf {
|
|||
class X86_64ExecutableWriter : public ExecutableWriter<X86_64ELFType> {
|
||||
public:
|
||||
X86_64ExecutableWriter(X86_64LinkingContext &ctx, X86_64TargetLayout &layout)
|
||||
: ExecutableWriter(ctx, layout), _gotFile(new GOTFile(ctx)), _ctx(ctx) {}
|
||||
: ExecutableWriter(ctx, layout), _gotFile(new GOTFile(ctx)) {}
|
||||
|
||||
protected:
|
||||
// Add any runtime files and their atoms to the output
|
||||
|
@ -28,7 +28,7 @@ protected:
|
|||
ExecutableWriter::createImplicitFiles(result);
|
||||
_gotFile->addAtom(*new (_gotFile->_alloc)
|
||||
GlobalOffsetTableAtom(*_gotFile));
|
||||
if (_ctx.isDynamic())
|
||||
if (this->_ctx.isDynamic())
|
||||
_gotFile->addAtom(*new (_gotFile->_alloc) DynamicAtom(*_gotFile));
|
||||
result.push_back(std::move(_gotFile));
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ private:
|
|||
};
|
||||
|
||||
std::unique_ptr<GOTFile> _gotFile;
|
||||
X86_64LinkingContext &_ctx;
|
||||
};
|
||||
|
||||
} // namespace elf
|
||||
|
|
Loading…
Reference in New Issue