I’m trying to fix unicode file handling on windows http://llvm.org/bugs/show_bug.cgi?id=10348. This currently doesn’t work because argv is encoded as multibyte string (clang project is configured this way).
Michael suggested converting command line to utf8, and this indeed solves the error that the driver emits, but there is another check in CompilerInstance that fails because FileSystemStatCache::get calls ::open and I’m guessing that this function is not smart enough to handle utf8 path on windows? Any ideas?
I have one more question. I added MultibyteToUTF8 function to PathV2.inc (windows version) and now I’d like to call it from ExpandArgv (driver.cpp) but this code is platform specific and isn’t visible (function is inside anonymous namespace). I could create a wrapper function that calls this function on windows and does nothing on other platforms. Is this the way to go, and where should I put it (llvm::sys::fs, llvm::sys::path or somewhere else)?