[PATCH] D37321: llvm-mt: Fix memory management in WindowsManifestMergerImpl::getMergedManifest
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 11:38:30 PDT 2017
vitalybuka added inline comments.
================
Comment at: lib/WindowsManifest/WindowsManifestMerger.cpp:680
+
+ return BufferSize ? MemoryBuffer::getMemBuffer(StringRef(
+ FROM_XML_CHAR(Buffer.get()), (size_t)BufferSize))
----------------
Another option is getMemBufferCopy and xmlNodeCopy(CombinedRoot)
More copying but then we will have less state and support of merge() calls getMergedManifest()
https://reviews.llvm.org/D37321
More information about the llvm-commits
mailing list