This is an archive of the discontinued LLVM Phabricator instance.

[Support] Windows - Refactor argument serialization logic when executing process in Program.inc [NFC]
ClosedPublic

Authored by rafaelauler on Aug 25 2014, 1:15 PM.

Details

Reviewers
rafael
Summary

This patch refactors the argument serialization logic used in the Execute function, used to launch new Windows processes. There is a critical step that joins char** arguments into a single string, building the command line used to launch the new process, and the readability of this code is improved if this part is refactored in its own helper function.

Diff Detail

Event Timeline

rafaelauler retitled this revision from to [Support] Windows - Refactor argument serialization logic when executing process in Program.inc [NFC].
rafaelauler updated this object.
rafaelauler edited the test plan for this revision. (Show Details)
rafaelauler added a reviewer: rafael.
rafaelauler added a subscriber: Unknown Object (MLST).
rafael accepted this revision.Aug 25 2014, 2:54 PM
rafael edited edge metadata.

LGTM with a check.

lib/Support/Windows/Program.inc
207

Don't you need a std::move in here?

This revision is now accepted and ready to land.Aug 25 2014, 2:54 PM

Thanks for reviewing it, could you please commit this? I don't have commit access. Or do you want me to change the helper function and make it return a raw pointer instead of a unique_ptr?

Cheers,
Rafael

rafael closed this revision.Aug 25 2014, 3:31 PM

r216411.