[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGab8f622c79b2: [DebugInfo] Fix file path separator when targeting windows. (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu 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 hans wrote: > zequanwu wrote: > > hans wro

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 514287. zequanwu marked an inline comment as done. zequanwu added a comment. Add comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D147256 Files: clang/include/clan

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Driver/ToolChains/Clang.cpp:583 + llvm::sys::path::Style Style = + llvm::sys::path::is_absolute(ObjFileNameForDebug) + ? llvm::sys::path

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu 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 hans wrote: > zequanwu wrote: > > hans wro

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-17 Thread Hans Wennborg via Phabricator via cfe-commits
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 co

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu 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 hans wrote: > Won't the code above (line 5

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 513611. zequanwu added a comment. Added clang-cl option test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D147256 Files: clang/include/clang/Basic/LangOptions.h clan

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-14 Thread Hans Wennborg via Phabricator via cfe-commits
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 Won't the code above (line 580) make many file

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-13 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 513252. zequanwu added a comment. Herald added a subscriber: MaskRay. - Move remove_dots to clang driver. - Revert changes to llc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-12 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added subscribers: thieta, saudi. aganea added a comment. + @saudi @thieta Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D147256 ___ cfe-commits mailing list c

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-12 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D147256#4262002 , @zequanwu wrote: > In D147256#4261949 , @hans wrote: > >>> Well, MSVC cl removes redundant dots so we shouldn't remove >>> llvm::sys::path::remove_dots. >> >> Could we d

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-12 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D147256#4261949 , @hans wrote: >> Well, MSVC cl removes redundant dots so we shouldn't remove >> llvm::sys::path::remove_dots. > > Could we do the `remove_dots` on the Clang side, where we can decide based on > the LangOpts?

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-12 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. > Well, MSVC cl removes redundant dots so we shouldn't remove > llvm::sys::path::remove_dots. Could we do the `remove_dots` on the Clang side, where we can decide based on the LangOpts? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D147256#4258419 , @zequanwu wrote: > In D147256#4257797 , @hans wrote: > >> In D147256#4249527 , @zequanwu >> wrote: >> >>> - Add a `-use-tar

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D147256#4257797 , @hans wrote: > In D147256#4249527 , @zequanwu > wrote: > >> - Add a `-use-target-path-separator` flag for llc. >> - Add test for llc with that flag. > > But where do

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-11 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D147256#4249527 , @zequanwu wrote: > - Add a `-use-target-path-separator` flag for llc. > - Add test for llc with that flag. But where does `TM.Options.ObjectFilenameForDebug` come from? Presumably it comes from Clang at some po

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-06 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 511496. zequanwu added a comment. - Add a `-use-target-path-separator` flag for llc. - Add test for llc with that flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D14725

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-05 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. An LLVM code change should be testable on its own; this has it tested by Clang. I think you need a new command-line option to set TargetOptions::UseTargetPathSeparator e.g. via llvm-mc. Other TargetOptions are handled this way. Repository: rG LLVM Github Monorepo

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-04-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 58. zequanwu added a comment. Herald added a subscriber: ormris. - Pass `LangOptions.UseTargetPathSeparator` down to TargetOptions to use host path separator when it's set. - Add a test case. The problem is when if we are targeting to linux, clang won'

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D147256#4237099 , @probinson wrote: > I think we cannot be 100% sure about source paths in a cross-compile > situation. Cross-compiling on platform A targeting platform B does not mean > your sources and debugger UI are on platf

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-31 Thread Paul Robinson via Phabricator via cfe-commits
probinson added subscribers: debug-info, probinson. probinson added a comment. I think we cannot be 100% sure about source paths in a cross-compile situation. Cross-compiling on platform A targeting platform B does not mean your sources and debugger UI are on platform B. My users keep source and

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D147256#4236522 , @hans wrote: > Thanks for working on this! > > The `-ffile-reproducible` flag name refers to making `#file` directives > reproducible, but `LangOptions.UseTargetPathSeparator` sounds a lot broader > :) I do

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 510057. zequanwu marked 2 inline comments as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147256/new/ https://reviews.llvm.org/D147256 Files: clang/include

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Thanks for working on this! The `-ffile-reproducible` flag name refers to making `#file` directives reproducible, but `LangOptions.UseTargetPathSeparator` sounds a lot broader :) I don't know what others think, but it would be nice to not have to introduce any more flags

[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.

2023-03-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: hans, aaron.ballman, ayzhao, aganea. Herald added a subscriber: hiraditya. Herald added a project: All. zequanwu requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Thi