mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix reading archive members with / in the name.
This is important for thin archives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -162,10 +162,10 @@ ErrorOr<StringRef> Archive::Child::getName() const {
|
||||
+ Parent->StringTable->getSize()))
|
||||
return object_error::parse_failed;
|
||||
|
||||
// GNU long file names end with a /.
|
||||
// GNU long file names end with a "/\n".
|
||||
if (Parent->kind() == K_GNU || Parent->kind() == K_MIPS64) {
|
||||
StringRef::size_type End = StringRef(addr).find('/');
|
||||
return StringRef(addr, End);
|
||||
StringRef::size_type End = StringRef(addr).find('\n');
|
||||
return StringRef(addr, End - 1);
|
||||
}
|
||||
return StringRef(addr);
|
||||
} else if (name.startswith("#1/")) {
|
||||
|
Reference in New Issue
Block a user