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 | e5c9cb5eb6bce502faaedea04014dab46f6540f4 (patch) | |
tree | 7e0155eeab8ecac7a202cff5d092c0f73c15cce8 /tools/lto | |
parent | b590a75eb566be4257f23340d3037ea1447e997e (diff) | |
download | external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.zip external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.tar.gz external_llvm-e5c9cb5eb6bce502faaedea04014dab46f6540f4.tar.bz2 |
For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r-- | tools/lto/lto.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index 570558a..372e6ea 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -295,7 +295,11 @@ LinkTimeOptimizer::optimizeModules(const std::string &OutputFilename, } sys::Path tmpAsmFilePath("/tmp/"); - tmpAsmFilePath.createTemporaryFileOnDisk(); + std::string ErrMsg; + if (tmpAsmFilePath.createTemporaryFileOnDisk(&ErrMsg)) { + std::cerr << "lto: " << ErrMsg << "\n"; + return; + } sys::RemoveFileOnSignal(tmpAsmFilePath); std::ofstream asmFile(tmpAsmFilePath.c_str(), io_mode); |