[llvm-commits] CVS: llvm-tv/lib/Snapshot/WriteSnapshot.cpp

Misha Brukman brukman at cs.uiuc.edu
Mon Apr 18 11:40:28 PDT 2005



Changes in directory llvm-tv/lib/Snapshot:

WriteSnapshot.cpp updated: 1.10 -> 1.11
---
Log message:

Use the sys::Path interface instead of the older Support file routines


---
Diffs of the changes:  (+4 -3)

 WriteSnapshot.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm-tv/lib/Snapshot/WriteSnapshot.cpp
diff -u llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.10 llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.11
--- llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.10	Tue Oct  5 13:38:25 2004
+++ llvm-tv/lib/Snapshot/WriteSnapshot.cpp	Mon Apr 18 13:40:17 2005
@@ -91,13 +91,14 @@
 
   // Since we were not successful in sending a signal to an already-running
   // instance of llvm-tv, start a new instance and send a signal to it.
-  std::string llvmtvExe = FindExecutable("llvm-tv", ""); 
-  if (llvmtvExe != "" && isExecutableFile(llvmtvExe)) {
+  sys::Path llvmtvExe = FindExecutable("llvm-tv", ""); 
+  if (llvmtvExe.isValid() && !llvmtvExe.isEmpty() && llvmtvExe.isFile() &&
+      llvmtvExe.executable()) {
     int pid = fork();
     // Child process morphs into llvm-tv
     if (!pid) {
       char *argv[1]; argv[0] = 0; 
-      if (execve(llvmtvExe.c_str(), argv, environ) == -1) {
+      if (execve(llvmtvExe.toString().c_str(), argv, environ) == -1) {
         perror("execve");
         return false;
       }






More information about the llvm-commits mailing list