[PATCH] D26734: [ELF] Don't replace path separators on *NIX
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 10:52:59 PST 2016
ruiu added inline comments.
================
Comment at: lld/trunk/lib/Core/Reproduce.cpp:56
static void convertToUnixPathSeparator(SmallString<128> &Path) {
+#ifdef LLVM_ON_WIN32
std::replace(Path.begin(), Path.end(), '\\', '/');
----------------
filcab wrote:
> Nit: How about `if (LLVM_ON_WIN32)`?
> It would force you to always be able to compile the code :-)
Is that a common practice? I believe for #define'd macros, we usually use #ifdef.
================
Comment at: lld/trunk/test/ELF/reproduce-backslash.s:1
+# REQUIRES: x86, cpio, shell
+
----------------
filcab wrote:
> Can `shell` be replaced by `UNSUPPORTED: system-windows`, or are you relying on having a "proper shell" and I'm missing something?
`shell` is used to imply "not on Windows", though it is indeed confusing. Windows has shells (command prompt and explorer), of course, so we probably should define "unix", "posix" or something like that to identify Unix.
Repository:
rL LLVM
https://reviews.llvm.org/D26734
More information about the llvm-commits
mailing list