[llvm-commits] CVS: llvm/lib/System/Unix/Path.inc
Reid Spencer
reid at x10sys.com
Tue Aug 22 16:27:40 PDT 2006
Changes in directory llvm/lib/System/Unix:
Path.inc updated: 1.53 -> 1.54
---
Log message:
For PR797: http://llvm.org/PR797 :
Change the Path::make*OnDisk methods exception free and adjust their usage.
---
Diffs of the changes: (+18 -9)
Path.inc | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
Index: llvm/lib/System/Unix/Path.inc
diff -u llvm/lib/System/Unix/Path.inc:1.53 llvm/lib/System/Unix/Path.inc:1.54
--- llvm/lib/System/Unix/Path.inc:1.53 Tue Aug 22 14:01:30 2006
+++ llvm/lib/System/Unix/Path.inc Tue Aug 22 18:27:22 2006
@@ -390,19 +390,28 @@
return true;
}
-void Path::makeReadableOnDisk() {
- if (!AddPermissionBits(*this, 0444))
- ThrowErrno(path + ": can't make file readable");
+bool Path::makeReadableOnDisk(std::string* ErrMsg) {
+ if (!AddPermissionBits(*this, 0444)) {
+ MakeErrMsg(ErrMsg, path + ": can't make file readable");
+ return true;
+ }
+ return false;
}
-void Path::makeWriteableOnDisk() {
- if (!AddPermissionBits(*this, 0222))
- ThrowErrno(path + ": can't make file writable");
+bool Path::makeWriteableOnDisk(std::string* ErrMsg) {
+ if (!AddPermissionBits(*this, 0222)) {
+ MakeErrMsg(ErrMsg, path + ": can't make file writable");
+ return true;
+ }
+ return false;
}
-void Path::makeExecutableOnDisk() {
- if (!AddPermissionBits(*this, 0111))
- ThrowErrno(path + ": can't make file executable");
+bool Path::makeExecutableOnDisk(std::string* ErrMsg) {
+ if (!AddPermissionBits(*this, 0111)) {
+ MakeErrMsg(ErrMsg, path + ": can't make file executable");
+ return true;
+ }
+ return false;
}
bool
More information about the llvm-commits
mailing list