[llvm-commits] CVS: llvm/lib/System/Win32/MappedFile.cpp Program.cpp
Reid Spencer
reid at x10sys.com
Sat Dec 11 09:37:12 PST 2004
Changes in directory llvm/lib/System/Win32:
MappedFile.cpp updated: 1.3 -> 1.4
Program.cpp updated: 1.5 -> 1.6
---
Log message:
Rename Path::get -> Path::toString
---
Diffs of the changes: (+12 -10)
Index: llvm/lib/System/Win32/MappedFile.cpp
diff -u llvm/lib/System/Win32/MappedFile.cpp:1.3 llvm/lib/System/Win32/MappedFile.cpp:1.4
--- llvm/lib/System/Win32/MappedFile.cpp:1.3 Tue Nov 16 01:00:23 2004
+++ llvm/lib/System/Win32/MappedFile.cpp Sat Dec 11 11:37:01 2004
@@ -42,7 +42,7 @@
if (info_->hFile == INVALID_HANDLE_VALUE) {
delete info_;
info_ = NULL;
- ThrowError(std::string("Can't open file: ") + path_.get());
+ ThrowError(std::string("Can't open file: ") + path_.toString());
}
LARGE_INTEGER size;
@@ -51,7 +51,7 @@
CloseHandle(info_->hFile);
delete info_;
info_ = NULL;
- ThrowError(std::string("Can't get size of file: ") + path_.get());
+ ThrowError(std::string("Can't get size of file: ") + path_.toString());
}
}
@@ -84,14 +84,14 @@
prot = PAGE_READWRITE;
info_->hMapping = CreateFileMapping(info_->hFile, NULL, prot, 0, 0, NULL);
if (info_->hMapping == NULL)
- ThrowError(std::string("Can't map file: ") + path_.get());
+ ThrowError(std::string("Can't map file: ") + path_.toString());
prot = (options_ & WRITE_ACCESS) ? FILE_MAP_WRITE : FILE_MAP_READ;
base_ = MapViewOfFileEx(info_->hMapping, prot, 0, 0, 0, NULL);
if (base_ == NULL) {
CloseHandle(info_->hMapping);
info_->hMapping = NULL;
- ThrowError(std::string("Can't map file: ") + path_.get());
+ ThrowError(std::string("Can't map file: ") + path_.toString());
}
}
return base_;
@@ -117,9 +117,9 @@
LARGE_INTEGER eof;
eof.QuadPart = new_size;
if (!SetFilePointerEx(info_->hFile, eof, NULL, FILE_BEGIN))
- ThrowError(std::string("Can't set end of file: ") + path_.get());
+ ThrowError(std::string("Can't set end of file: ") + path_.toString());
if (!SetEndOfFile(info_->hFile))
- ThrowError(std::string("Can't set end of file: ") + path_.get());
+ ThrowError(std::string("Can't set end of file: ") + path_.toString());
info_->size = new_size;
}
Index: llvm/lib/System/Win32/Program.cpp
diff -u llvm/lib/System/Win32/Program.cpp:1.5 llvm/lib/System/Win32/Program.cpp:1.6
--- llvm/lib/System/Win32/Program.cpp:1.5 Tue Nov 16 01:35:32 2004
+++ llvm/lib/System/Win32/Program.cpp Sat Dec 11 11:37:01 2004
@@ -71,7 +71,7 @@
Program::ExecuteAndWait(const Path& path,
const std::vector<std::string>& args) {
if (!path.executable())
- throw path.get() + " is not executable";
+ throw path.toString() + " is not executable";
// Windows wants a command line, not an array of args, to pass to the new
// process. We have to concatenate them all, while quoting the args that
@@ -124,10 +124,11 @@
PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(pi));
- if (!CreateProcess(path.get().c_str(), command, NULL, NULL, FALSE, 0,
+ if (!CreateProcess(path.c_str(), command, NULL, NULL, FALSE, 0,
NULL, NULL, &si, &pi))
{
- ThrowError(std::string("Couldn't execute program '") + path.get() + "'");
+ ThrowError(std::string("Couldn't execute program '") +
+ path.toString() + "'");
}
// Wait for it to terminate.
@@ -142,7 +143,8 @@
CloseHandle(pi.hThread);
if (!rc)
- ThrowError(std::string("Failed getting status for program '") + path.get() + "'");
+ ThrowError(std::string("Failed getting status for program '") +
+ path.toString() + "'");
return status;
}
More information about the llvm-commits
mailing list