[PATCH] D147256: [DebugInfo] Fix file path separator when targeting windows.
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 08:32:27 PDT 2023
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 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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147256/new/
https://reviews.llvm.org/D147256
More information about the llvm-commits
mailing list