diff options
author | Rui Ueyama <ruiu@google.com> | 2015-04-07 20:43:38 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-04-07 20:43:38 +0000 |
commit | 3c45cffd68cd9839d4737ea260ed2706ab304cc9 (patch) | |
tree | a9e98d63c888ff305a2683d6120ba195ccbed629 /lld/lib/ReaderWriter/MachO/LayoutPass.cpp | |
parent | 6bea2f4f88ddc4437c4a072ca60118e7ad8ed834 (diff) | |
download | bcm5719-llvm-3c45cffd68cd9839d4737ea260ed2706ab304cc9.tar.gz bcm5719-llvm-3c45cffd68cd9839d4737ea260ed2706ab304cc9.zip |
Merge MutableFile with SimpleFile.
SimpleFile is the only derived class of MutableFile.
This patch reduces the height of class hierarchy by removing
MutableFile class.
llvm-svn: 234354
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/LayoutPass.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/LayoutPass.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lld/lib/ReaderWriter/MachO/LayoutPass.cpp b/lld/lib/ReaderWriter/MachO/LayoutPass.cpp index 2d096e4c1a6..de3d5c21db1 100644 --- a/lld/lib/ReaderWriter/MachO/LayoutPass.cpp +++ b/lld/lib/ReaderWriter/MachO/LayoutPass.cpp @@ -133,7 +133,7 @@ static void checkReachabilityFromRoot(AtomToAtomT &followOnRoots, } } -static void printDefinedAtoms(const MutableFile::DefinedAtomRange &atomRange) { +static void printDefinedAtoms(const SimpleFile::DefinedAtomRange &atomRange) { for (const DefinedAtom *atom : atomRange) { llvm::dbgs() << " file=" << atom->file().path() << ", name=" << atom->name() @@ -146,7 +146,7 @@ static void printDefinedAtoms(const MutableFile::DefinedAtomRange &atomRange) { /// Verify that the followon chain is sane. Should not be called in /// release binary. -void LayoutPass::checkFollowonChain(MutableFile::DefinedAtomRange &range) { +void LayoutPass::checkFollowonChain(SimpleFile::DefinedAtomRange &range) { ScopedTask task(getDefaultDomain(), "LayoutPass::checkFollowonChain"); // Verify that there's no cycle in follow-on chain. @@ -329,7 +329,7 @@ void LayoutPass::setChainRoot(const DefinedAtom *targetAtom, /// d) If the targetAtom is part of a different chain and the root of the /// targetAtom until the targetAtom has all atoms of size 0, then chain the /// targetAtoms and its tree to the current chain -void LayoutPass::buildFollowOnTable(MutableFile::DefinedAtomRange &range) { +void LayoutPass::buildFollowOnTable(SimpleFile::DefinedAtomRange &range) { ScopedTask task(getDefaultDomain(), "LayoutPass::buildFollowOnTable"); // Set the initial size of the followon and the followonNext hash to the // number of atoms that we have. @@ -397,7 +397,7 @@ void LayoutPass::buildFollowOnTable(MutableFile::DefinedAtomRange &range) { /// assigning ordinals to each atom, if the atoms have their ordinals /// already assigned skip the atom and move to the next. This is the /// main map thats used to sort the atoms while comparing two atoms together -void LayoutPass::buildOrdinalOverrideMap(MutableFile::DefinedAtomRange &range) { +void LayoutPass::buildOrdinalOverrideMap(SimpleFile::DefinedAtomRange &range) { ScopedTask task(getDefaultDomain(), "LayoutPass::buildOrdinalOverrideMap"); uint64_t index = 0; for (const DefinedAtom *ai : range) { @@ -417,7 +417,7 @@ void LayoutPass::buildOrdinalOverrideMap(MutableFile::DefinedAtomRange &range) { } std::vector<LayoutPass::SortKey> -LayoutPass::decorate(MutableFile::DefinedAtomRange &atomRange) const { +LayoutPass::decorate(SimpleFile::DefinedAtomRange &atomRange) const { std::vector<SortKey> ret; for (const DefinedAtom *atom : atomRange) { auto ri = _followOnRoots.find(atom); @@ -429,7 +429,7 @@ LayoutPass::decorate(MutableFile::DefinedAtomRange &atomRange) const { return ret; } -void LayoutPass::undecorate(MutableFile::DefinedAtomRange &atomRange, +void LayoutPass::undecorate(SimpleFile::DefinedAtomRange &atomRange, std::vector<SortKey> &keys) const { size_t i = 0; for (SortKey &k : keys) @@ -437,10 +437,10 @@ void LayoutPass::undecorate(MutableFile::DefinedAtomRange &atomRange, } /// Perform the actual pass -void LayoutPass::perform(std::unique_ptr<MutableFile> &mergedFile) { +void LayoutPass::perform(std::unique_ptr<SimpleFile> &mergedFile) { // sort the atoms ScopedTask task(getDefaultDomain(), "LayoutPass"); - MutableFile::DefinedAtomRange atomRange = mergedFile->definedAtoms(); + SimpleFile::DefinedAtomRange atomRange = mergedFile->definedAtoms(); // Build follow on tables buildFollowOnTable(atomRange); |