Remove unused parameters.

llvm-svn: 229055
This commit is contained in:
Rui Ueyama 2015-02-13 04:02:55 +00:00
parent 3b057b3216
commit d9cb620330
7 changed files with 14 additions and 27 deletions

View File

@ -94,10 +94,7 @@ public:
/// referenced by the DT_RELA{,ENT,SZ} entries in the dynamic table.
/// Relocations that return true will be added to the dynamic relocation
/// table.
virtual bool isDynamicRelocation(const DefinedAtom &,
const Reference &) const {
return false;
}
virtual bool isDynamicRelocation(const Reference &) const { return false; }
/// \brief Is this a copy relocation?
///
@ -129,9 +126,7 @@ public:
/// by the DT_{JMPREL,PLTRELSZ} entries in the dynamic table.
/// Relocations that return true will be added to the dynamic plt relocation
/// table.
virtual bool isPLTRelocation(const DefinedAtom &, const Reference &) const {
return false;
}
virtual bool isPLTRelocation(const Reference &) const { return false; }
/// \brief The path to the dynamic interpreter
virtual StringRef getDefaultInterpreter() const {

View File

@ -35,8 +35,7 @@ public:
return _baseAddress;
}
bool isDynamicRelocation(const DefinedAtom &,
const Reference &r) const override {
bool isDynamicRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::AArch64);
@ -64,8 +63,7 @@ public:
return false;
}
bool isPLTRelocation(const DefinedAtom &,
const Reference &r) const override {
bool isPLTRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::AArch64);

View File

@ -571,10 +571,10 @@ ErrorOr<const lld::AtomLayout &> DefaultLayout<ELFT>::addAtom(const Atom *atom)
// Add runtime relocations to the .rela section.
for (const auto &reloc : *definedAtom) {
bool isLocalReloc = true;
if (_context.isDynamicRelocation(*definedAtom, *reloc)) {
if (_context.isDynamicRelocation(*reloc)) {
getDynamicRelocationTable()->addRelocation(*definedAtom, *reloc);
isLocalReloc = false;
} else if (_context.isPLTRelocation(*definedAtom, *reloc)) {
} else if (_context.isPLTRelocation(*reloc)) {
getPLTRelocationTable()->addRelocation(*definedAtom, *reloc);
isLocalReloc = false;
}

View File

@ -26,8 +26,7 @@ public:
void addPasses(PassManager &) override;
bool isDynamicRelocation(const DefinedAtom &,
const Reference &r) const override {
bool isDynamicRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
switch (r.kindValue()) {
@ -39,7 +38,7 @@ public:
}
}
bool isPLTRelocation(const DefinedAtom &, const Reference &r) const override {
bool isPLTRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
switch (r.kindValue()) {

View File

@ -74,8 +74,7 @@ void MipsLinkingContext::addPasses(PassManager &pm) {
pm.add(llvm::make_unique<elf::MipsCtorsOrderPass>());
}
bool MipsLinkingContext::isDynamicRelocation(const DefinedAtom &,
const Reference &r) const {
bool MipsLinkingContext::isDynamicRelocation(const Reference &r) const {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::Mips);
@ -100,8 +99,7 @@ bool MipsLinkingContext::isCopyRelocation(const Reference &r) const {
return false;
}
bool MipsLinkingContext::isPLTRelocation(const DefinedAtom &,
const Reference &r) const {
bool MipsLinkingContext::isPLTRelocation(const Reference &r) const {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::Mips);

View File

@ -50,10 +50,9 @@ public:
StringRef getDefaultInterpreter() const override;
void addPasses(PassManager &pm) override;
bool isRelaOutputFormat() const override { return false; }
bool isDynamicRelocation(const DefinedAtom &,
const Reference &r) const override;
bool isDynamicRelocation(const Reference &r) const override;
bool isCopyRelocation(const Reference &r) const override;
bool isPLTRelocation(const DefinedAtom &, const Reference &r) const override;
bool isPLTRelocation(const Reference &r) const override;
private:
MipsELFFlagsMerger _flagsMerger;

View File

@ -37,8 +37,7 @@ public:
return _baseAddress;
}
bool isDynamicRelocation(const DefinedAtom &,
const Reference &r) const override {
bool isDynamicRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::x86_64);
@ -63,8 +62,7 @@ public:
return false;
}
virtual bool isPLTRelocation(const DefinedAtom &,
const Reference &r) const override {
virtual bool isPLTRelocation(const Reference &r) const override {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
assert(r.kindArch() == Reference::KindArch::x86_64);