[PATCH] D99580: [CLANG] [DebugInfo] Convert File name to native format

kamlesh kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 30 15:48:52 PDT 2021


kamleshbhalui added a comment.

In D99580#2659858 <https://reviews.llvm.org/D99580#2659858>, @amccarth wrote:

> Another possible issue is that llvm::sys::path and other functions try to map Windows filesystem concepts to Posix ones. There are many cases where there isn't a perfect mapping. For example: Windows has a current working directory _per drive_, and so it can be hard to resolve paths like D:foo.ext, which are relative to something other than the "current working directory." Details like this can come into play in the immediate vicinity of the code change, so I have some trepidation.

Agree with you but this problem exist with and without this patch.

> It looks like the code change is for everyone, but the new test is specific to mingw.

For Linux like platform it does not create problem because input file  path is already in POSIX style, so having a test case will not test the change because even without the change it will pass.
Even on windows problem occur only when input file path specified in POSIX style(i.e. C:/foo/bar/test.c), if specify the path windows style(i.e. C:\foo\bar\test.c) then the fix not required.

>   Is that the right place for the new test?

In same directory their are many mingw related test, so added this test their, still if everyone strongly feels it should be in separate directory I will do that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99580/new/

https://reviews.llvm.org/D99580



More information about the cfe-commits mailing list