[llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp
Reid Spencer
reid at x10sys.com
Tue Aug 22 17:39:58 PDT 2006
Changes in directory llvm/tools/llvm-ld:
llvm-ld.cpp updated: 1.35 -> 1.36
---
Log message:
For PR797: http://llvm.org/PR797 :
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
---
Diffs of the changes: (+3 -4)
llvm-ld.cpp | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
Index: llvm/tools/llvm-ld/llvm-ld.cpp
diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.35 llvm/tools/llvm-ld/llvm-ld.cpp:1.36
--- llvm/tools/llvm-ld/llvm-ld.cpp:1.35 Tue Aug 22 18:27:23 2006
+++ llvm/tools/llvm-ld/llvm-ld.cpp Tue Aug 22 19:39:35 2006
@@ -492,16 +492,15 @@
}
// 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);
More information about the llvm-commits
mailing list