summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-20 18:30:37 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-20 18:30:37 +0000
commiteb729e004bed134c61b811286e958815b9c4809f (patch)
tree89da2b7cba708a59a8f0c7fa5008a3d15d129c84 /tools
parent3781fbc29a8d808dcb8f2f11da0bbce635629308 (diff)
downloadllvm-eb729e004bed134c61b811286e958815b9c4809f.tar.gz
llvm-eb729e004bed134c61b811286e958815b9c4809f.tar.bz2
llvm-eb729e004bed134c61b811286e958815b9c4809f.tar.xz
Use only the filename when deciding if a file is a duplicate.
Matches gnu ar behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-ar/llvm-ar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index 941b631080..4c986715ae 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -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();