[PATCH] D62493: [Driver] Always use Unix-style paths in the Darwin driver

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 13:33:27 PDT 2019

ldionne added a comment.

In D62493#1519708 <https://reviews.llvm.org/D62493#1519708>, @rnk wrote:

> So, there's nothing wrong, functionally speaking, with what we do today, right? It's just inconvenient to test.

What we do for Darwin today (without this patch) is functionally correct, but hard to test.

What we do for other platforms (e.g. Linux) today is probably not correct, since we use Unix-style paths all around the place.

> The difficulty of testing the driver has been a long standing problem. I think we might want to instead invent some new kind of alternative to `-###` for writing driver tests that is more FileCheck friendly. For example, we could print flags one-per line, without quoting. I think it would also be reasonable to do some dumb string post-processing to rewrite Windows-style paths to Unix style paths so they always look the same.

Would it make sense to be able to define FileCheck variables (with `-DFOO`) while giving them a type? If I could specify that I'm passing paths to FileCheck and it normalized them for the platform the tests are being run on, I think that would solve the issue. Do you think that's an idea worth pursuing?

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list