[PATCH] D24176: Remove temoprary files.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 09:51:52 PDT 2016

rnk added inline comments.

Comment at: COFF/DriverUtils.cpp:307
@@ +306,3 @@
+        check(MemoryBuffer::getFile(Path), "could not open " + Path);
+    return MemoryBuffer::getMemBufferCopy(MB->getBuffer(), Path);
+  }
Rather than doing map & copy, you can force MemoryBuffer::getFile to use read/ReadFile the file by passing `IsVolatileSize=true`. That parameter should probably be named `DontUseMmap` or `ForceReadFile`. At the time I think people were trying to document *why* you might want to not use mmap.

You should probably pass the extra parameters anyway, because we definitely don't need `RequiresNullTerminator=true` for an object file.


More information about the llvm-commits mailing list