[PATCH] D24176: Remove temoprary files.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 10:39:29 PDT 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: COFF/DriverUtils.cpp:300
@@ +299,3 @@
+      return;
+    if (sys::fs::remove(Path))
+      fatal("failed to remove " + Path);
----------------
If this turns out to not be reliable, we can reconsider the error check later

================
Comment at: COFF/DriverUtils.cpp:307
@@ +306,3 @@
+  // so it is safe to remove the file immediately after this function
+  // is called (you cannot remove an opened file no Windows.)
+  std::unique_ptr<MemoryBuffer> getMemoryBuffer() {
----------------
s/no Windows/on Windows/

================
Comment at: COFF/DriverUtils.cpp:309
@@ +308,3 @@
+  std::unique_ptr<MemoryBuffer> getMemoryBuffer() {
+    // IsVolatileSize=true enforces MemoryBuffer to not use mmap().
+    return check(MemoryBuffer::getFile(Path, /*FileSize=*/-1,
----------------
s/enforces/forces/


https://reviews.llvm.org/D24176





More information about the llvm-commits mailing list