Skip to content

Commit

Permalink
Basic: update the use of the ExecuteNoWait API
Browse files Browse the repository at this point in the history
This now takes `ArrayRef<StringRef>` and `Optional<ArrayRef<StringRef>>`
parameters.  Explicitly update the interfaces to match.  This is particularly
important to repair the Windows build.
  • Loading branch information
compnerd committed Aug 22, 2018
1 parent 42785be commit dd0dd7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Basic/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "swift/Basic/Program.h"

#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include "llvm/Support/Program.h"

Expand All @@ -33,7 +34,9 @@ int swift::ExecuteInPlace(const char *Program, const char **args,

return result;
#else
int result = llvm::sys::ExecuteAndWait(Program, args, env);
llvm::ArrayRef<llvm::StringRef> Env = llvm::toStringRefArray(env);
int result =
llvm::sys::ExecuteAndWait(Program, llvm::toStringRefArray(args), Env);
if (result >= 0)
exit(result);
return result;
Expand Down

0 comments on commit dd0dd7b

Please sign in to comment.