summaryrefslogtreecommitdiff
path: root/tools/llvm-ld
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2006-09-01 20:35:17 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2006-09-01 20:35:17 +0000
commit7d5154490357a0cb12383e15a57640d9c20644a1 (patch)
tree9a87e8fa853a85653e08d0c51e11fb7688a11e96 /tools/llvm-ld
parentb5aaee00276ec5d666a0202c51e5264ba7dc060e (diff)
downloadllvm-7d5154490357a0cb12383e15a57640d9c20644a1.tar.gz
llvm-7d5154490357a0cb12383e15a57640d9c20644a1.tar.bz2
llvm-7d5154490357a0cb12383e15a57640d9c20644a1.tar.xz
- Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r--tools/llvm-ld/llvm-ld.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp
index 6b9adaff5a..ab7109fb85 100644
--- a/tools/llvm-ld/llvm-ld.cpp
+++ b/tools/llvm-ld/llvm-ld.cpp
@@ -345,12 +345,18 @@ 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 ErrMsg;
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), llvmstub);
+
+ if (0 != sys::CopyFile(sys::Path(OutputFilename), llvmstub, &ErrMsg)) {
+ std::cerr << argv[0] << ": " << ErrMsg << "\n";
+ exit(1);
+ }
+
return;
#endif