[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
Sun Jan 28 04:52:02 PST 2018


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, zturner, inglorion.

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42621

Files:
  COFF/Driver.cpp


Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -574,6 +574,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.131705.patch
Type: text/x-patch
Size: 350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180128/54aa85c0/attachment.bin>


More information about the llvm-commits mailing list