hans added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Clang.cpp:583 + llvm::sys::path::Style Style = + llvm::sys::path::is_absolute(ObjFileNameForDebug) + ? llvm::sys::path::Style::native ---------------- zequanwu wrote: > hans wrote: > > Won't the code above (line 580) make many filenames absolute and cause us > > to use native slashes even when we want backslashes? > > > > This would also need a test. > > Won't the code above (line 580) make many filenames absolute and cause us > > to use native slashes even when we want backslashes? > Yes, I don't think we should change anything if it's converted to an absolute > path. > > Only if the `-fdebug-compilation-dir` is not given or is an absolute path, > the path in `/Fo` will be converted to absolute path. Users can avoid the > path being converted to absolute path by passing a relative path to > `-fdebug-compilation-dir`, just like what we do in chrome build > (`-fdebug-compilation-dir=.`). > > Added a test. Apologies for all the questions, but I find the logic a bit complex still. The test cases are helpful though. Could we simplify by just always using Windows slashes here, regardless of `-fdebug-compilation-dir` etc.? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D147256 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits