Patch replaces forward slashes with backward inside response.txt
Details
Diff Detail
Event Timeline
lib/Core/Reproduce.cpp | ||
---|---|---|
98 | Exactly the same line is in CpioFile::append. Is it dead with this change? |
lib/Core/Reproduce.cpp | ||
---|---|---|
98 | I'll check, I did know about that one. |
lib/Core/Reproduce.cpp | ||
---|---|---|
98 | So no, it is not dead. Current line is responsible for converting slashes in lines of response.txt file. I thought about placing them together in CpioFile::append: // Use unix path separators so the cpio can be extracted on both unix and // windows. std::replace(Fullpath.begin(), Fullpath.end(), '\\', '/'); std::replace(Data.begin(), Data.end(), '\\', '/'); But that probably not good thing to do because in that way slashes will be converted for all responce file and not only for path lines, what can change the original invocation result line. |
lib/Core/Reproduce.cpp | ||
---|---|---|
81 | Please add a comment when you do something not obvious. // Returned string is a slash-separated path even on Windows to avoid // a mess with backslash-as-escape and backslash-as-path-separator. | |
test/ELF/reproduce-windows2.s | ||
11 | Don't use --to-stdout as it won't work on non-GNU systems. |
- Addressed review comments
lib/Core/Reproduce.cpp | ||
---|---|---|
81 | Done. | |
test/ELF/reproduce-windows2.s | ||
11 | I wonder how to make a test then. I think we can not unpack cpio on windows as "can get over the path limit on windows" like mentioned in reproduce-error.s. |
LGTM by me with the suggested change, but please wait for Rui to comment.
lib/Core/Reproduce.cpp | ||
---|---|---|
98 | Ah, I see it now that CpioFile::append uses path::append with might add a \. Even if that was changed to use '/' directly, Basename might still have a \ in it. So OK, we need the two calls, but can you factor it into a trivial helper function? Something like convertToUnixPathSeparator? | |
test/lit.cfg | ||
210 | llvm use the name system-windows. This is basically assuming that the cpio on windows is gnu, which I think is fine. Rui, is that OK? |
Please add a comment when you do something not obvious.