[llvm-commits] CVS: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp

Reid Spencer reid at x10sys.com
Wed Aug 23 00:31:09 PDT 2006



Changes in directory llvm/lib/Bytecode/Archive:

ArchiveWriter.cpp updated: 1.28 -> 1.29
---
Log message:

For PR797: http://llvm.org/PR797 :
Eliminate exception throwing from Path::renamePathOnDisk and adjust its 
users correspondingly.


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

 ArchiveWriter.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp
diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.28 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.29
--- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.28	Tue Aug 22 19:39:34 2006
+++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp	Wed Aug 23 02:30:48 2006
@@ -496,7 +496,8 @@
     arch.close();
     
     // Move the final file over top of TmpArchive
-    FinalFilePath.renamePathOnDisk(TmpArchive);
+    if (FinalFilePath.renamePathOnDisk(TmpArchive, error))
+      return false;
   }
   
   // Before we replace the actual archive, we need to forget all the
@@ -504,7 +505,8 @@
   // this because we cannot replace an open file on Windows.
   cleanUpMemory();
   
-  TmpArchive.renamePathOnDisk(archPath);
+  if (TmpArchive.renamePathOnDisk(archPath, error))
+    return false;
 
   return true;
 }






More information about the llvm-commits mailing list