Correct compilation for Cygwin. FindExecutable now returns a sys::Path.
authorReid Spencer <rspencer@reidspencer.com>
Wed, 22 Dec 2004 13:50:17 +0000 (13:50 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 22 Dec 2004 13:50:17 +0000 (13:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19109 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ld/llvm-ld.cpp

index ebc9e25cf3e01d84dc5121131bf678d213ac68c0..b944383db5596a46bc97ca7794c9d04422acf76d 100644 (file)
@@ -310,12 +310,12 @@ static void EmitShellScript(char **argv) {
   // Windows doesn't support #!/bin/sh style shell scripts in .exe files.  To
   // support windows systems, we copy the llvm-stub.exe executable from the
   // build tree to the destination file.
-  std::string llvmstub = FindExecutable("llvm-stub.exe", argv[0]);
-  if (llvmstub.empty()) {
+  sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0]);
+  if (llvmstub.isEmpty()) {
     std::cerr << "Could not find llvm-stub.exe executable!\n";
     exit(1);
   }
-  sys::CopyFile(sys::Path(OutputFilename), sys::Path(llvmstub));
+  sys::CopyFile(sys::Path(OutputFilename), llvmstub);
   return;
 #endif