diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 07:30:48 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 07:30:48 +0000 |
commit | 5a060775da43ec2ef37e839e93a0805d543708a9 (patch) | |
tree | 6cd7efaa67dec5d363323ccc5b9ee95c2e5bb8bd /tools | |
parent | 6f4c60770cfe6c485cdcb1397df59d2c7778cbc9 (diff) | |
download | external_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.zip external_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.gz external_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.bz2 |
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index 53f04e6..6b9adaf 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -505,7 +505,10 @@ int main(int argc, char **argv, char **envp) { if (tmp_output.isBytecodeFile()) { sys::Path target(RealBytecodeOutput); target.eraseFromDisk(); - tmp_output.renamePathOnDisk(target); + if (tmp_output.renamePathOnDisk(target, &ErrMsg)) { + std::cerr << argv[0] << ": " << ErrMsg << "\n"; + return 2; + } } else return PrintAndReturn( "Post-link optimization output is not bytecode"); |