Basic: update the use of the ExecuteNoWait API

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.
This commit is contained in:
Saleem Abdulrasool
2018-08-22 15:32:22 -07:00
parent 42785bedbd
commit dd0dd7b2d1

View File

@@ -12,6 +12,7 @@
#include "swift/Basic/Program.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include "llvm/Support/Program.h"
@@ -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;