[lld] r219348 - [PECOFF] Simplify IdataPass. No functionality change.
Rui Ueyama
ruiu at google.com
Wed Oct 8 15:33:00 PDT 2014
Author: ruiu
Date: Wed Oct 8 17:33:00 2014
New Revision: 219348
URL: http://llvm.org/viewvc/llvm-project?rev=219348&view=rev
Log:
[PECOFF] Simplify IdataPass. No functionality change.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.cpp
lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
Modified: lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.cpp?rev=219348&r1=219347&r2=219348&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.cpp Wed Oct 8 17:33:00 2014
@@ -138,7 +138,7 @@ void IdataPass::perform(std::unique_ptr<
// 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 &
}
/// 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);
Modified: lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h?rev=219348&r1=219347&r2=219348&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/IdataPass.h Wed Oct 8 17:33:00 2014
@@ -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
More information about the llvm-commits
mailing list