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

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 15:00:45 PDT 2018


stella.stamenova added inline comments.


================
Comment at: tools/lld/lld.cpp:129-130
+  SpecificBumpPtrAllocator<char> ArgAllocator;
+  ExitOnErr(errorCodeToError(sys::Process::GetArgumentVector(
+      Argv, makeArrayRef(Argv_, Argc_), ArgAllocator)));
+
----------------
ruiu wrote:
> Why is this function's signature so complex? How can it fail?
On Windows, this calls several functions which can fail:
* GetCommandLineW
* CommandLineToArgvW
* WideCharToMultiByte


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45550





More information about the llvm-commits mailing list