Child child;
public:
- child_iterator() : child(Child(nullptr, nullptr)) {}
child_iterator(const Child &c) : child(c) {}
const Child *operator->() const { return &child; }
const Child &operator*() const { return child; }
bool IsNewMember;
StringRef Name;
+ union {
object::Archive::child_iterator OldI;
-
StringRef NewFilename;
+ };
public:
NewArchiveIterator(object::Archive::child_iterator I, StringRef Name);
NewArchiveIterator(StringRef I, StringRef Name);
- NewArchiveIterator();
bool isNewMember() const;
StringRef getName() const;
}
Archive::Archive(MemoryBufferRef Source, std::error_code &ec)
- : Binary(Binary::ID_Archive, Source), SymbolTable(child_end()) {
+ : Binary(Binary::ID_Archive, Source), SymbolTable(child_end()),
+ StringTable(child_end()), FirstRegular(child_end()) {
StringRef Buffer = Data.getBuffer();
// Check for sufficient magic.
if (Buffer.startswith(ThinMagic)) {
using namespace llvm;
-NewArchiveIterator::NewArchiveIterator() {}
-
NewArchiveIterator::NewArchiveIterator(object::Archive::child_iterator I,
StringRef Name)
: IsNewMember(false), Name(Name), OldI(I) {}
assert(unsigned(InsertPos) <= Ret.size());
Ret.insert(Ret.begin() + InsertPos, Moved.begin(), Moved.end());
- Ret.insert(Ret.begin() + InsertPos, Members.size(), NewArchiveIterator());
+ Ret.insert(Ret.begin() + InsertPos, Members.size(),
+ NewArchiveIterator("", ""));
int Pos = InsertPos;
for (auto &Member : Members) {
StringRef Name = sys::path::filename(Member);