Pass user only if it's non-empty. Patch by Sandeep.
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 5 Aug 2009 09:32:53 +0000 (09:32 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 5 Aug 2009 09:32:53 +0000 (09:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78184 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/ToolRunner.cpp

index 81314a85c389d7c85fd21f1ce69ae867a02b8b0d..9180c53557c822a5441903b36f95300f89c8344b 100644 (file)
@@ -698,8 +698,10 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
   else {
     ProgramArgs.push_back(RemoteClientPath.c_str());
     ProgramArgs.push_back(RemoteHost.c_str());
-    ProgramArgs.push_back("-l");
-    ProgramArgs.push_back(RemoteUser.c_str());
+    if (!RemoteUser.empty()) {
+      ProgramArgs.push_back("-l");
+      ProgramArgs.push_back(RemoteUser.c_str());
+    }
     if (!RemotePort.empty()) {
       ProgramArgs.push_back("-p");
       ProgramArgs.push_back(RemotePort.c_str());