mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
Fix VC++ breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22353 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4607b54877
commit
edb9d6bc72
@ -99,11 +99,11 @@ Path::GetTemporaryDirectory() {
|
||||
// Append a subdirectory passed on our process id so multiple LLVMs don't
|
||||
// step on each other's toes.
|
||||
sprintf(pathname, "LLVM_%u", GetCurrentProcessId());
|
||||
result.appendDirectory(pathname);
|
||||
result.appendComponent(pathname);
|
||||
|
||||
// If there's a directory left over from a previous LLVM execution that
|
||||
// happened to have the same process id, get rid of it.
|
||||
result.destroyDirectory(true);
|
||||
result.destroy(true);
|
||||
|
||||
// And finally (re-)create the empty directory.
|
||||
result.createDirectory(false);
|
||||
@ -195,10 +195,7 @@ Path::GetUserHomeDirectory() {
|
||||
|
||||
bool
|
||||
Path::isFile() const {
|
||||
WIN32_FILE_ATTRIBUTE_DATA fi;
|
||||
if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi))
|
||||
ThrowError(std::string(path) + ": Can't get status: ");
|
||||
return fi.dwFileAttributes & FILE_ATTRIBUTE_NORMAL;
|
||||
return !isDirectory();
|
||||
}
|
||||
|
||||
bool
|
||||
@ -395,7 +392,7 @@ Path::set(const std::string& a_path) {
|
||||
}
|
||||
|
||||
bool
|
||||
Path::appendComponent(const std::string& dir) {
|
||||
Path::appendComponent(const std::string& name) {
|
||||
if (name.empty())
|
||||
return false;
|
||||
std::string save(path);
|
||||
@ -528,7 +525,7 @@ Path::destroy(bool remove_contents) const {
|
||||
if (!DeleteFile(path.c_str()))
|
||||
ThrowError(path + ": Can't destroy file: ");
|
||||
return true;
|
||||
} else if (isDirectory()) {
|
||||
} else /* isDirectory() */ {
|
||||
|
||||
// If it doesn't exist, we're done.
|
||||
if (!exists())
|
||||
|
@ -31,9 +31,9 @@ Program::FindProgramByName(const std::string& progName) {
|
||||
if (progName.length() == 0) // no program
|
||||
return Path();
|
||||
Path temp;
|
||||
if (!temp.setFile(progName)) // invalid name
|
||||
if (!temp.set(progName)) // invalid name
|
||||
return Path();
|
||||
if (temp.executable()) // already executable as is
|
||||
if (temp.canExecute()) // already executable as is
|
||||
return temp;
|
||||
|
||||
// At this point, the file name is valid and its not executable.
|
||||
@ -101,7 +101,7 @@ Program::ExecuteAndWait(const Path& path,
|
||||
const char** envp,
|
||||
const Path** redirects,
|
||||
unsigned secondsToWait) {
|
||||
if (!path.executable())
|
||||
if (!path.canExecute())
|
||||
throw path.toString() + " is not executable";
|
||||
|
||||
// Windows wants a command line, not an array of args, to pass to the new
|
||||
|
@ -123,7 +123,7 @@ static void Cleanup() {
|
||||
if (FilesToRemove != NULL)
|
||||
while (!FilesToRemove->empty()) {
|
||||
try {
|
||||
FilesToRemove->back().destroyFile();
|
||||
FilesToRemove->back().destroy();
|
||||
} catch (...) {
|
||||
}
|
||||
FilesToRemove->pop_back();
|
||||
@ -132,7 +132,7 @@ static void Cleanup() {
|
||||
if (DirectoriesToRemove != NULL)
|
||||
while (!DirectoriesToRemove->empty()) {
|
||||
try {
|
||||
DirectoriesToRemove->back().destroyDirectory(true);
|
||||
DirectoriesToRemove->back().destroy(true);
|
||||
} catch (...) {
|
||||
}
|
||||
DirectoriesToRemove->pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user