forked from OSchip/llvm-project
Use only the filename when deciding if a file is a duplicate.
Matches gnu ar behavior. llvm-svn: 184448
This commit is contained in:
parent
d7c0561ad0
commit
b0c3cac2ed
|
@ -4,7 +4,9 @@
|
|||
;RUN: rm -f %T/test.a
|
||||
;RUN: touch %T/a-very-long-file-name
|
||||
;RUN: llvm-ar r %T/test.a %s %T/a-very-long-file-name
|
||||
;RUN: llvm-ar r %T/test.a %T/a-very-long-file-name
|
||||
;RUN: llvm-ar t %T/test.a | FileCheck -check-prefix=MEMBERS %s
|
||||
;MEMBERS-NOT: /
|
||||
;MEMBERS: a-very-long-file-name
|
||||
;MEMBERS: directory.ll
|
||||
;MEMBERS-NOT: a-very-long-file-name
|
||||
|
|
|
@ -563,7 +563,7 @@ doReplaceOrInsert(std::string* ErrMsg) {
|
|||
std::set<std::string>::iterator found = remaining.end();
|
||||
for (std::set<std::string>::iterator RI = remaining.begin(),
|
||||
RE = remaining.end(); RI != RE; ++RI ) {
|
||||
std::string compare(*RI);
|
||||
std::string compare(sys::path::filename(*RI));
|
||||
if (TruncateNames && compare.length() > 15) {
|
||||
const char* nm = compare.c_str();
|
||||
unsigned len = compare.length();
|
||||
|
|
Loading…
Reference in New Issue