[PATCH] D57842: [llvm-ar][libObject] Fix relative paths when nesting thin archives.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 13:33:37 PST 2019


rupprecht marked 2 inline comments as done.
rupprecht added inline comments.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:238
+  if (Thin)
+    Out << computeRelativePath(ArcName, M.MemberName);
+  else
----------------
ruiu wrote:
> So, M.MemberName is relative to ArcName if it is thin, and it is used as-is if not thin. It doesn't look like we really have to distinguish two here. Could you call `computeRelativePath` early in llvm-ar and set its result to MemberName? Then I think you can remove special handling of thin archive here.
Hmm, good point, that would be a lot simpler. I'll try it.


================
Comment at: llvm/test/tools/llvm-ar/flatten-thin-archive-directories.test:15
+
+# FIXME: ar t mistakenly prepends / here, this should be "foo/a.txt".
+CHECK: /foo/a.txt
----------------
ruiu wrote:
> Are you going to fix this bug as well?
I'll do it separately -- see D57845


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57842/new/

https://reviews.llvm.org/D57842





More information about the llvm-commits mailing list