summaryrefslogtreecommitdiffstats
path: root/llvm/utils/not/not.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/not/not.cpp')
-rw-r--r--llvm/utils/not/not.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/utils/not/not.cpp b/llvm/utils/not/not.cpp
index de71b4c6887..f48079d8875 100644
--- a/llvm/utils/not/not.cpp
+++ b/llvm/utils/not/not.cpp
@@ -38,8 +38,12 @@ int main(int argc, const char **argv) {
return 1;
}
+ std::vector<StringRef> Argv;
+ Argv.reserve(argc);
+ for (int i = 0; i < argc; ++i)
+ Argv.push_back(argv[i]);
std::string ErrMsg;
- int Result = sys::ExecuteAndWait(*Program, argv, nullptr, {}, 0, 0, &ErrMsg);
+ int Result = sys::ExecuteAndWait(*Program, Argv, None, {}, 0, 0, &ErrMsg);
#ifdef _WIN32
// Handle abort() in msvcrt -- It has exit code as 3. abort(), aka
// unreachable, should be recognized as a crash. However, some binaries use
OpenPOWER on IntegriCloud