git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109363
91177308-0d34-0410-b5e6-
96231b3b80d8
- std::vector<const char*> ProgramArgs;
+ std::vector<const char *> ProgramArgs;
+
+ // Declared here so that the destructor only runs after
+ // ProgramArgs is used.
+ std::string Exec;
if (RemoteClientPath.isEmpty())
ProgramArgs.push_back(OutputBinary.c_str());
if (RemoteClientPath.isEmpty())
ProgramArgs.push_back(OutputBinary.c_str());
// Full path to the binary. We need to cd to the exec directory because
// there is a dylib there that the exec expects to find in the CWD
char* env_pwd = getenv("PWD");
// Full path to the binary. We need to cd to the exec directory because
// there is a dylib there that the exec expects to find in the CWD
char* env_pwd = getenv("PWD");
- std::string Exec = "cd ";
Exec += env_pwd;
Exec += "; ./";
Exec += OutputBinary.c_str();
Exec += env_pwd;
Exec += "; ./";
Exec += OutputBinary.c_str();