[PATCH] D42621: [LLD] [COFF] Remove the temporary file if not updating the import library

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 23:27:45 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD323725: [COFF] Remove the temporary file if not updating the import library (authored by mstorsjo, committed by ).

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42621

Files:
  COFF/Driver.cpp


Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -572,6 +572,8 @@
   if ((*OldBuf)->getBuffer() != NewBuf->getBuffer()) {
     OldBuf->reset();
     HandleError(errorCodeToError(sys::fs::rename(TmpName, Path)));
+  } else {
+    sys::fs::remove(TmpName);
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42621.131928.patch
Type: text/x-patch
Size: 350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180130/fb501b81/attachment.bin>


More information about the llvm-commits mailing list