[llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp

Reid Spencer reid at x10sys.com
Tue Aug 22 16:27:42 PDT 2006



Changes in directory llvm/tools/llvm-ld:

llvm-ld.cpp updated: 1.34 -> 1.35
---
Log message:

For PR797: http://llvm.org/PR797 :
Change the Path::make*OnDisk methods exception free and adjust their usage.


---
Diffs of the changes:  (+13 -3)

 llvm-ld.cpp |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)


Index: llvm/tools/llvm-ld/llvm-ld.cpp
diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.34 llvm/tools/llvm-ld/llvm-ld.cpp:1.35
--- llvm/tools/llvm-ld/llvm-ld.cpp:1.34	Mon Aug 21 01:04:45 2006
+++ llvm/tools/llvm-ld/llvm-ld.cpp	Tue Aug 22 18:27:23 2006
@@ -598,11 +598,21 @@
       }
 
       // Make the script executable...
-      sys::Path(OutputFilename).makeExecutableOnDisk();
+      std::string ErrMsg;
+      if (sys::Path(OutputFilename).makeExecutableOnDisk(&ErrMsg)) {
+        std::cerr << argv[0] << ": " << ErrMsg << "\n";
+        return 1;
+      }
 
       // Make the bytecode file readable and directly executable in LLEE as well
-      sys::Path(RealBytecodeOutput).makeExecutableOnDisk();
-      sys::Path(RealBytecodeOutput).makeReadableOnDisk();
+      if (sys::Path(RealBytecodeOutput).makeExecutableOnDisk(&ErrMsg)) {
+        std::cerr << argv[0] << ": " << ErrMsg << "\n";
+        return 1;
+      }
+      if (sys::Path(RealBytecodeOutput).makeReadableOnDisk(&ErrMsg)) {
+        std::cerr << argv[0] << ": " << ErrMsg << "\n";
+        return 1;
+      }
     }
 
     return 0;






More information about the llvm-commits mailing list