Test case? On Mar 13, 2013, at 1:50 PM, Michael Spencer <[email protected]> wrote:
> Replaces / with \ on Windows. nop on other platforms. > > http://llvm-reviews.chandlerc.com/D540 > > Files: > lib/Driver/Driver.cpp > > Index: lib/Driver/Driver.cpp > =================================================================== > --- lib/Driver/Driver.cpp > +++ lib/Driver/Driver.cpp > @@ -456,10 +456,12 @@ > ArgStringList Files = C.getTempFiles(); > for (ArgStringList::const_iterator it = Files.begin(), ie = Files.end(); > it != ie; ++it) { > - Diag(clang::diag::note_drv_command_failed_diag_msg) << *it; > + SmallString<128> NativePath; > + llvm::sys::path::native(*it, NativePath); > + Diag(clang::diag::note_drv_command_failed_diag_msg) << NativePath; > > std::string Err; > - std::string Script = StringRef(*it).rsplit('.').first; > + std::string Script = StringRef(NativePath).rsplit('.').first; > Script += ".sh"; > llvm::raw_fd_ostream ScriptOS(Script.c_str(), Err, > llvm::raw_fd_ostream::F_Excl | > @@ -476,7 +478,7 @@ > E = Cmd.find(" ", I); > assert (E != std::string::npos && "-main-file-name missing > argument?"); > StringRef OldFilename = StringRef(Cmd).slice(I, E); > - StringRef NewFilename = llvm::sys::path::filename(*it); > + StringRef NewFilename = llvm::sys::path::filename(NativePath); > I = StringRef(Cmd).rfind(OldFilename); > E = I + OldFilename.size(); > I = Cmd.rfind(" ", I) + 1; > <D540.1.patch>_______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
