mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Disallow Archive::child_iterator that don't point to an archive.
NFC, just less error prone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -207,7 +207,8 @@ ErrorOr<std::unique_ptr<Archive>> Archive::create(MemoryBufferRef Source) {
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
NewArchiveIterator::NewArchiveIterator() {}
|
||||
|
||||
NewArchiveIterator::NewArchiveIterator(object::Archive::child_iterator I,
|
||||
StringRef Name)
|
||||
: IsNewMember(false), Name(Name), OldI(I) {}
|
||||
|
||||
Reference in New Issue
Block a user