[llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Program.inc Signals.inc

Jeff Cohen jeffc at jolt-lang.org
Thu Jul 7 19:48:53 PDT 2005



Changes in directory llvm/lib/System/Win32:

Path.inc updated: 1.34 -> 1.35
Program.inc updated: 1.14 -> 1.15
Signals.inc updated: 1.14 -> 1.15
---
Log message:

Fix VC++ breakage

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

 Path.inc    |   13 +++++--------
 Program.inc |    6 +++---
 Signals.inc |    4 ++--
 3 files changed, 10 insertions(+), 13 deletions(-)


Index: llvm/lib/System/Win32/Path.inc
diff -u llvm/lib/System/Win32/Path.inc:1.34 llvm/lib/System/Win32/Path.inc:1.35
--- llvm/lib/System/Win32/Path.inc:1.34	Thu Jul  7 18:35:23 2005
+++ llvm/lib/System/Win32/Path.inc	Thu Jul  7 21:48:42 2005
@@ -99,11 +99,11 @@
   // 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 @@
 
 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 @@
 }
 
 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 @@
     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()) 


Index: llvm/lib/System/Win32/Program.inc
diff -u llvm/lib/System/Win32/Program.inc:1.14 llvm/lib/System/Win32/Program.inc:1.15
--- llvm/lib/System/Win32/Program.inc:1.14	Thu May  5 17:33:09 2005
+++ llvm/lib/System/Win32/Program.inc	Thu Jul  7 21:48:42 2005
@@ -31,9 +31,9 @@
   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 @@
                         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


Index: llvm/lib/System/Win32/Signals.inc
diff -u llvm/lib/System/Win32/Signals.inc:1.14 llvm/lib/System/Win32/Signals.inc:1.15
--- llvm/lib/System/Win32/Signals.inc:1.14	Thu May  5 17:33:09 2005
+++ llvm/lib/System/Win32/Signals.inc	Thu Jul  7 21:48:42 2005
@@ -123,7 +123,7 @@
   if (FilesToRemove != NULL)
     while (!FilesToRemove->empty()) {
       try {
-        FilesToRemove->back().destroyFile();
+        FilesToRemove->back().destroy();
       } catch (...) {
       }
       FilesToRemove->pop_back();
@@ -132,7 +132,7 @@
   if (DirectoriesToRemove != NULL)
     while (!DirectoriesToRemove->empty()) {
       try {
-        DirectoriesToRemove->back().destroyDirectory(true);
+        DirectoriesToRemove->back().destroy(true);
       } catch (...) {
       }
       DirectoriesToRemove->pop_back();






More information about the llvm-commits mailing list