[PATCH] D26656: [COFF] Fix manifest resource file creation on Windows

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 18:23:38 PST 2016


ruiu added inline comments.


================
Comment at: COFF/DriverUtils.cpp:437
   E.run();
-  return ResFile.getMemoryBuffer();
+  return llvm::make_unique<TemporaryFileMemoryBuffer>(std::move(ResFile));
 }
----------------
Does this work?

  return MemoryBuffer::getMemBufferCopy(ResFile.getMemoryBuffer().getBuffer());

This creates a copy of memory buffer that do not refer the original memory buffer, so you don't need to define the subclass of MemoryBuffer.


https://reviews.llvm.org/D26656





More information about the llvm-commits mailing list