llvm-ar: Don't write the directory in the string table.
[oota-llvm.git] / lib / Object / ArchiveWriter.cpp
index bd372c37b8f6e461d888fd813ad68ab30d89778a..fd06c6e8687f50466f3561397a2f394b0c3cd551 100644 (file)
@@ -160,7 +160,7 @@ static void writeStringTable(raw_fd_ostream &Out,
                              bool Thin) {
   unsigned StartOffset = 0;
   for (const NewArchiveIterator &I : Members) {
-    StringRef Name = I.getName();
+    StringRef Name = sys::path::filename(I.getName());
     if (!useStringTable(Thin, Name))
       continue;
     if (StartOffset == 0) {