[PATCH] D45551: Use GetArgumentVector to retrieve the utf-8 encoded arguments on all platforms

Aaron Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 11 18:51:47 PDT 2018


asmith created this revision.
asmith added reviewers: eli.friedman, llvm-commits.

After running the lld unit tests on Windows, it was discovered that various llvm tools on Windows are not handling unicode command lines. An example of a test that does not work on Windows because of this issue is lld/test/ELF/format-binary-non-ascii.s.

This problem was originally fixed in r329468 by modifying Windows/Path.inc to try and use the current codepage. Eli Friedman recommended instead modifying the llvm tools to properly handle unicode command lines by calling sys::Process::GetArgumentVector.

This reverts r329468 and updates llvm-mc and llvm-readobj to handle unicode command lines. With this change and the change in https://reviews.llvm.org/D45550, lld/test/ELF/format-binary-non-ascii.s passes.


Repository:
  rL LLVM

https://reviews.llvm.org/D45551

Files:
  Support/Windows/Path.inc
  llvm-mc/llvm-mc.cpp
  llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45551.142104.patch
Type: text/x-patch
Size: 5309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/a222a8b6/attachment.bin>


More information about the llvm-commits mailing list