This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,10 @@ ErrorOr<StringRef> Archive::Child::getName() const {
162
162
+ Parent->StringTable ->getSize ()))
163
163
return object_error::parse_failed;
164
164
165
- // GNU long file names end with a / .
165
+ // GNU long file names end with a "/\n" .
166
166
if (Parent->kind () == K_GNU || Parent->kind () == K_MIPS64) {
167
- StringRef::size_type End = StringRef (addr).find (' / ' );
168
- return StringRef (addr, End);
167
+ StringRef::size_type End = StringRef (addr).find (' \n ' );
168
+ return StringRef (addr, End - 1 );
169
169
}
170
170
return StringRef (addr);
171
171
} else if (name.startswith (" #1/" )) {
Original file line number Diff line number Diff line change @@ -38,3 +38,9 @@ THIN-NEXT: rw-r--r-- 1000/1000 2280 2014-12-16 00:56:27.000000000 IsNAN.o
38
38
Test reading an archive with just a symbol table. We use to reject them.
39
39
RUN: llvm-ar tv %p/Inputs/symtab-only.a | FileCheck --allow-empty --check-prefix=EMPTY %s
40
40
EMPTY-NOT: {{.}}
41
+
42
+ Test reading a thin archive with directory names.
43
+ RUN: env TZ=GMT llvm-ar tv %p/Inputs/thin-path.a | FileCheck %s --check-prefix=THINPATH -strict-whitespace
44
+
45
+ THINPATH: rw-r--r-- 0/0 1224 1970-01-01 00:00:00.000000000 test.o
46
+ THINPATH-NEXT: rw-r--r-- 0/0 1224 1970-01-01 00:00:00.000000000 t/test2.o
You can’t perform that action at this time.
0 commit comments