Adding changes to support GNU style archive library reading

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167853 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Shankar Easwaran
2012-11-13 18:38:42 +00:00
parent f741482387
commit 206252cc9f
9 changed files with 431 additions and 26 deletions

View File

@ -122,6 +122,16 @@ public:
Archive(MemoryBuffer *source, error_code &ec);
enum Kind {
K_GNU,
K_BSD,
K_COFF
};
Kind kind() const {
return Format;
}
child_iterator begin_children(bool skip_internal = true) const;
child_iterator end_children() const;
@ -133,9 +143,13 @@ public:
return v->isArchive();
}
// check if a symbol is in the archive
child_iterator findSym(StringRef name) const;
private:
child_iterator SymbolTable;
child_iterator StringTable;
Kind Format;
};
}