summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-10-08 22:33:00 +0000
committerRui Ueyama <ruiu@google.com>2014-10-08 22:33:00 +0000
commitaa5add859d85e09cc5be7c53ec42c2820f9d148d (patch)
treee0de3dd337ed076a5946e3b4e867bce65ec145ca
parentffcbe9b04849b7679742c924b334102a1fb08cd6 (diff)
downloadbcm5719-llvm-aa5add859d85e09cc5be7c53ec42c2820f9d148d.tar.gz
bcm5719-llvm-aa5add859d85e09cc5be7c53ec42c2820f9d148d.zip
[PECOFF] Simplify IdataPass. No functionality change.
llvm-svn: 219348
-rw-r--r--lld/lib/ReaderWriter/PECOFF/IdataPass.cpp6
-rw-r--r--lld/lib/ReaderWriter/PECOFF/IdataPass.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp b/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp
index 7a686ade0e0..cab507d1352 100644
--- a/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp
@@ -138,7 +138,7 @@ void IdataPass::perform(std::unique_ptr<MutableFile> &file) {
// context.file in the IdataAtom's constructor.
new (_alloc) idata::NullImportDirectoryAtom(context);
- replaceSharedLibraryAtoms(context);
+ replaceSharedLibraryAtoms(*file);
}
std::map<StringRef, std::vector<COFFSharedLibraryAtom *> >
@@ -156,8 +156,8 @@ IdataPass::groupByLoadName(MutableFile &file) {
}
/// Transforms a reference to a COFFSharedLibraryAtom to a real reference.
-void IdataPass::replaceSharedLibraryAtoms(idata::IdataContext &context) {
- for (const DefinedAtom *atom : context.file.defined()) {
+void IdataPass::replaceSharedLibraryAtoms(MutableFile &file) {
+ for (const DefinedAtom *atom : file.defined()) {
for (const Reference *ref : *atom) {
const Atom *target = ref->target();
auto *sharedAtom = dyn_cast<SharedLibraryAtom>(target);
diff --git a/lld/lib/ReaderWriter/PECOFF/IdataPass.h b/lld/lib/ReaderWriter/PECOFF/IdataPass.h
index 5a06b37e7be..0adf2dd881e 100644
--- a/lld/lib/ReaderWriter/PECOFF/IdataPass.h
+++ b/lld/lib/ReaderWriter/PECOFF/IdataPass.h
@@ -135,10 +135,10 @@ public:
void perform(std::unique_ptr<MutableFile> &file) override;
private:
- std::map<StringRef, std::vector<COFFSharedLibraryAtom *> >
+ std::map<StringRef, std::vector<COFFSharedLibraryAtom *>>
groupByLoadName(MutableFile &file);
- void replaceSharedLibraryAtoms(idata::IdataContext &context);
+ void replaceSharedLibraryAtoms(MutableFile &file);
// A dummy file with which all the atoms created in the pass will be
// associated. Atoms need to be associated to an input file even if it's not
OpenPOWER on IntegriCloud