Add SectionPosition and OrderPass
llvm-svn: 173300
diff --git a/lld/lib/ReaderWriter/ReaderArchive.cpp b/lld/lib/ReaderWriter/ReaderArchive.cpp
index 0fe4c2d..6dcde18 100644
--- a/lld/lib/ReaderWriter/ReaderArchive.cpp
+++ b/lld/lib/ReaderWriter/ReaderArchive.cpp
@@ -56,10 +56,21 @@
assert(result.size() == 1);
+ // TO DO: set ordinal of child just loaded
+
// give up the pointer so that this object no longer manages it
return result[0].release();
}
+ virtual void setOrdinalAndIncrement(uint64_t &ordinal) const {
+ _ordinal = ordinal++;
+ // Leave space in ordinal range for all children
+ for (auto mf = _archive->begin_children(),
+ me = _archive->end_children(); mf != me; ++mf) {
+ ordinal++;
+ }
+ }
+
virtual const atom_collection<DefinedAtom> &defined() const {
return _definedAtoms;
}