[PATCH] D33575: [llvm-ar] Make llvm-lib behave more like the MSVC archiver

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 16:52:40 PDT 2017


rnk added inline comments.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:224
+  // archives with backslashes in them.
+  sys::path::Style Style = sys::path::Style::posix;
 
----------------
zturner wrote:
> I don't think this is entirely what you want.  This means more than just "use forward slashes".  It means "use the entire posix path grammar".  Valid filename characters, drive letter parsing, etc all depend on this.  I suspect we'll run into subtle changes with this.  If you really just want to use slashes, use the native host path style, and at the end write `replace(str, '\\', '/');`
That's awful. I'll go ahead and revert my changes here. I just wanted to get rid of `#ifdef LLVM_ON_WIN32`. :(


https://reviews.llvm.org/D33575





More information about the llvm-commits mailing list