This is an archive of the discontinued LLVM Phabricator instance.

Use GetArgumentVector to retrieve the utf-8 encoded arguments on all platforms
AbandonedPublic

Authored by asmith on Apr 11 2018, 6:51 PM.

Details

Summary

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-objdump to handle unicode command lines. With this change and the change in D45550, lld/test/ELF/format-binary-non-ascii.s passes.

Diff Detail

Event Timeline

efriedma accepted this revision.Apr 12 2018, 12:42 PM
efriedma added a subscriber: efriedma.

LGTM

This revision is now accepted and ready to land.Apr 12 2018, 12:42 PM
asmith abandoned this revision.Apr 18 2018, 8:16 AM