[LLVMdev] [cfe-dev] Unicode path handling on Windows

Nikola Smiljanic popizdeh at gmail.com
Tue Sep 20 14:15:57 PDT 2011


OK since this approach makes sense I'll shoot with my questions :)

1. Where should get_utf8_argv go and is the name of this function OK? Right
now the function is inside llvm::sys::fs namespace because I need access to
Windows.h, should I leave it there.
2. get_utf8_argv allocates new char** representing utf8 argv, should I
deallocate this inside driver.cpp, use std::vector<std::string> instead or
ignore the allocation completely?
3. There is an #ifdef inside driver.cpp right now that I don't like.
get_utf8_argv works for windows only, but I could change the function to
accept argv and return it as vector of utf8 strings. It would convert char*
to std::string on unix and use GetCommandLine + utf8 conversion on windows.
4. Should I wrap functions like ::fstat and ::close for consistency even
though they don't work with paths?

I'll fix everything that is formatting related. You're right, current patch
has Open only for windows but I'll add the other one as well.

On Tue, Sep 20, 2011 at 7:42 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

>
> You may want to test the consistency of this approach from the
> original with regards to backslashes and quotation marks, if for no
> other reason than documenting it. CommandLineToArgvW calls them out
> in the documentation.
>
>
I don't understand what you meant by this? I'm aware that CommandLineToArgvW
has special interpretation of backslashes and quotes, but what should I
check exactly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110920/ca3fdb39/attachment.html>


More information about the llvm-dev mailing list