summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2015-04-07 21:12:18 +0000
committerSimon Atanasyan <simon@atanasyan.com>2015-04-07 21:12:18 +0000
commit3dba8a2d9681171bbb1fe90422b5241f6f7a706e (patch)
tree06e27e0da1b8beec00974a25e1d2e190ee059f20
parent073e9fb5e14c71fab2f70d88495f2a9c9cf18a0e (diff)
downloadbcm5719-llvm-3dba8a2d9681171bbb1fe90422b5241f6f7a706e.tar.gz
bcm5719-llvm-3dba8a2d9681171bbb1fe90422b5241f6f7a706e.zip
[ELF] Remove unused xxxWriter class fields
llvm-svn: 234357
-rw-r--r--lld/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h5
-rw-r--r--lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h7
-rw-r--r--lld/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h5
-rw-r--r--lld/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h6
-rw-r--r--lld/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h5
5 files changed, 7 insertions, 21 deletions
diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h b/lld/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h
index efd48974748..b5e745de7e5 100644
--- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h
+++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h
@@ -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(
diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h b/lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h
index b6cc4962ca9..4ad85656d02 100644
--- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h
+++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h
@@ -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));
}
diff --git a/lld/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h b/lld/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h
index 6488eb07388..4f6642d398c 100644
--- a/lld/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h
+++ b/lld/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h
@@ -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(
diff --git a/lld/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h b/lld/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h
index 5ddae51b6e8..fcec064e010 100644
--- a/lld/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h
+++ b/lld/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h
@@ -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(
diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h b/lld/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h
index 84240046eeb..6f398595a52 100644
--- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h
+++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h
@@ -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
OpenPOWER on IntegriCloud