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

Misha Brukman brukman at cs.uiuc.edu
Thu Jul 21 10:31:03 PDT 2005



Changes in directory llvm-tv/lib/Snapshot:

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

Adjust to changes in Pass/ModulePass and System::Path APIs


---
Diffs of the changes:  (+9 -9)

 WriteSnapshot.cpp |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm-tv/lib/Snapshot/WriteSnapshot.cpp
diff -u llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.11 llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.12
--- llvm-tv/lib/Snapshot/WriteSnapshot.cpp:1.11	Mon Apr 18 13:40:17 2005
+++ llvm-tv/lib/Snapshot/WriteSnapshot.cpp	Thu Jul 21 12:30:52 2005
@@ -39,16 +39,16 @@
 extern char **environ;
 
 namespace {
-  struct Snapshot : public Pass {
+  struct Snapshot : public ModulePass {
     /// getAnalysisUsage - this pass does not require or invalidate any analysis
     ///
     virtual void getAnalysisUsage(AnalysisUsage &AU) {
       AU.setPreservesAll();
     }
     
-    /// runPass - save the Module in a pre-defined location with our naming
+    /// runOnModule - save the Module in a pre-defined location with our naming
     /// strategy
-    bool runPass(Module &M);
+    bool runOnModule(Module &M);
 
   private:
     bool sendSignalToLLVMTV();
@@ -64,11 +64,11 @@
 }
 
 
-/// runPass - save snapshot to a pre-defined directory with a consecutive number
-/// in the name (for alphabetization) and the name of the pass that ran just
-/// before this one. Signal llvm-tv that fresh bytecode file has arrived for
-/// consumption.
-bool Snapshot::runPass(Module &M) {
+/// runOnModule - save snapshot to a pre-defined directory with a consecutive
+/// number in the name (for alphabetization) and the name of the pass that ran
+/// just before this one. Signal llvm-tv that fresh bytecode file has arrived
+/// for consumption.
+bool Snapshot::runOnModule(Module &M) {
   // Make sure the snapshots dir exists, which it will unless this
   // is the first time we've ever run the -snapshot pass.
   EnsureDirectoryExists (llvmtvPath);
@@ -93,7 +93,7 @@
   // instance of llvm-tv, start a new instance and send a signal to it.
   sys::Path llvmtvExe = FindExecutable("llvm-tv", ""); 
   if (llvmtvExe.isValid() && !llvmtvExe.isEmpty() && llvmtvExe.isFile() &&
-      llvmtvExe.executable()) {
+      llvmtvExe.canExecute()) {
     int pid = fork();
     // Child process morphs into llvm-tv
     if (!pid) {






More information about the llvm-commits mailing list