summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-22 23:54:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-22 23:54:35 +0000
commita1a7a352676dc6be4a1a0d0a201ede7f780fc7c9 (patch)
tree5c33f890315ef2226eb502c5b3f7bf363731230d /llvm/lib/System
parent9d2f19c7e47e758be119027f16e4fc1b039271f7 (diff)
downloadbcm5719-llvm-a1a7a352676dc6be4a1a0d0a201ede7f780fc7c9.tar.gz
bcm5719-llvm-a1a7a352676dc6be4a1a0d0a201ede7f780fc7c9.zip
For PR797:
Adjust code to compensate for Path class interface change. llvm-svn: 29837
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Win32/Path.inc15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc
index b40318fe27c..2f2e8520133 100644
--- a/llvm/lib/System/Win32/Path.inc
+++ b/llvm/lib/System/Win32/Path.inc
@@ -326,11 +326,12 @@ static bool AddPermissionBits(const std::string& Filename, int bits) {
return true;
}
-void Path::makeReadableOnDisk() {
+bool Path::makeReadableOnDisk(std::string* ErrMsg) {
// All files are readable on Windows (ignoring security attributes).
+ return false;
}
-void Path::makeWriteableOnDisk() {
+void Path::makeWriteableOnDisk(std::string* ErrMsg) {
DWORD attr = GetFileAttributes(path.c_str());
// If it doesn't exist, we're done.
@@ -338,13 +339,17 @@ void Path::makeWriteableOnDisk() {
return;
if (attr & FILE_ATTRIBUTE_READONLY) {
- if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY))
- ThrowError(std::string(path) + ": Can't make file writable: ");
+ if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY)) {
+ MakeErrMsg(ErrMsg, std::string(path) + ": Can't make file writable: ");
+ return true;
+ }
}
+ return false;
}
-void Path::makeExecutableOnDisk() {
+bool Path::makeExecutableOnDisk(std::string* ErrMsg) {
// All files are executable on Windows (ignoring security attributes).
+ return false;
}
bool
OpenPOWER on IntegriCloud