Fix for failure to resolve include files on Windows when the files in question are virtual, i.e. created with mapVirtualFile(). The files are searched for in a hash which is keyed on the file's normalized path as a string. Searches for a file in that hash will fail unless the search path is in the exact same textual form.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I've previously encountered a problem fixing this:
http://reviews.llvm.org/D3686
clang/test/Misc/remap-file.c was failing since FileManager considers / different than \.
Is this test passing for you?
Comment Actions
It should be possible to add a testcase showing that we now add a \ instead of a / on windows, no?
Comment Actions
Yes, you're right, remap-file.c fails with this change. FWIW, the test is flawed. It verifies the following very specific (and incorrect) matching logic, which is to accept only paths where all separators excluding the final one are backslashes, and only the final one is a forward slash. I.e. C:\path\to\the/file.h
Anyway, here's another patch that fixes that one too.