summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/Archive.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-20 13:41:51 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-20 13:41:51 +0000
commit789c129a9fe75bf2f3bf53df636f8fdde93573b2 (patch)
tree990e78f9cb45d08e2032ffcbc257a7211f0737ae /llvm/tools/llvm-ar/Archive.cpp
parent5e6b9eccce9f500069cdb957ef8100ff1b234230 (diff)
downloadbcm5719-llvm-789c129a9fe75bf2f3bf53df636f8fdde93573b2.tar.gz
bcm5719-llvm-789c129a9fe75bf2f3bf53df636f8fdde93573b2.zip
Add r184420 back, but also handle long file names.
Original message: Don't include directory names in archives. This matches the behavior of both gnu and os x versions of ar. llvm-svn: 184423
Diffstat (limited to 'llvm/tools/llvm-ar/Archive.cpp')
-rw-r--r--llvm/tools/llvm-ar/Archive.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/tools/llvm-ar/Archive.cpp b/llvm/tools/llvm-ar/Archive.cpp
index cac65cf7706..520e410e1ac 100644
--- a/llvm/tools/llvm-ar/Archive.cpp
+++ b/llvm/tools/llvm-ar/Archive.cpp
@@ -97,15 +97,8 @@ bool ArchiveMember::replaceWith(StringRef newFile, std::string* ErrMsg) {
else
flags &= ~StringTableFlag;
- // If it has a slash then it has a path
- bool hasSlash = path.find('/') != std::string::npos;
- if (hasSlash)
- flags |= HasPathFlag;
- else
- flags &= ~HasPathFlag;
-
// If it has a slash or its over 15 chars then its a long filename format
- if (hasSlash || path.length() > 15)
+ if (path.length() > 15)
flags |= HasLongFilenameFlag;
else
flags &= ~HasLongFilenameFlag;
OpenPOWER on IntegriCloud