[PATCH] D36255: Integrate manifest merging library into LLD.
Eric Beckmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 18:40:58 PDT 2017
ecbeckmann marked an inline comment as done.
ecbeckmann added inline comments.
================
Comment at: lld/COFF/DriverUtils.cpp:414
+ if (OutputBuffer)
+ return OutputBuffer->getBuffer();
+ // Using built-in library failed, possibly because libxml2 is not installed.
----------------
ruiu wrote:
> I'm a little confused. Is this safe?
>
> I mean, you are returning a pointer to a buffer owned by an object, which is in turn managed by a unique_ptr. But the unique_ptr is destructed as soon as you return from this function. What am I missing?
Function returns std::string, not a pointer. std::string copy constructor is implicitly called in the return.
https://reviews.llvm.org/D36255
More information about the llvm-commits
mailing list