diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 00:39:35 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-23 00:39:35 +0000 |
| commit | 8db844241b25c5a350d3edeeac459fca69c7ae51 (patch) | |
| tree | f207ee659a6aa42169484ebf0fd20b313c5e8b54 /llvm/tools/llvm-ld | |
| parent | 3376c6d8c572d25b87670cd44e00e018a27b37b3 (diff) | |
| download | bcm5719-llvm-8db844241b25c5a350d3edeeac459fca69c7ae51.tar.gz bcm5719-llvm-8db844241b25c5a350d3edeeac459fca69c7ae51.zip | |
For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
llvm-svn: 29840
Diffstat (limited to 'llvm/tools/llvm-ld')
| -rw-r--r-- | llvm/tools/llvm-ld/llvm-ld.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp index 679522f63df..53f04e69542 100644 --- a/llvm/tools/llvm-ld/llvm-ld.cpp +++ b/llvm/tools/llvm-ld/llvm-ld.cpp @@ -492,16 +492,15 @@ int main(int argc, char **argv, char **envp) { } // Get the program arguments sys::Path tmp_output("opt_result"); - if (!tmp_output.createTemporaryFileOnDisk()) { - return PrintAndReturn( - "Can't create temporary file for post-link optimization"); + std::string ErrMsg; + if (tmp_output.createTemporaryFileOnDisk(&ErrMsg)) { + return PrintAndReturn(ErrMsg); } const char* args[4]; args[0] = I->c_str(); args[1] = RealBytecodeOutput.c_str(); args[2] = tmp_output.c_str(); args[3] = 0; - std::string ErrMsg; if (0 == sys::Program::ExecuteAndWait(prog, args, 0,0,0, &ErrMsg)) { if (tmp_output.isBytecodeFile()) { sys::Path target(RealBytecodeOutput); |

