[lld] r216252 - Fix build after r216223: Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using std::unique_ptr
David Blaikie
dblaikie at gmail.com
Thu Aug 21 19:26:04 PDT 2014
On Aug 21, 2014 6:25 PM, "Hans Wennborg" <hans at hanshq.net> wrote:
>
> Author: hans
> Date: Thu Aug 21 20:13:29 2014
> New Revision: 216252
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216252&view=rev
> Log:
> Fix build after r216223: Explicitly pass ownership of the MemoryBuffer to
AddNewSourceBuffer using std::unique_ptr
Sorry about the fallout - thanks for fixing it up!
>
> Modified:
> lld/trunk/include/lld/Driver/WinLinkModuleDef.h
> lld/trunk/include/lld/ReaderWriter/LinkerScript.h
>
> Modified: lld/trunk/include/lld/Driver/WinLinkModuleDef.h
> URL:
http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/WinLinkModuleDef.h?rev=216252&r1=216251&r2=216252&view=diff
>
==============================================================================
> --- lld/trunk/include/lld/Driver/WinLinkModuleDef.h (original)
> +++ lld/trunk/include/lld/Driver/WinLinkModuleDef.h Thu Aug 21 20:13:29
2014
> @@ -54,7 +54,7 @@ public:
> class Lexer {
> public:
> explicit Lexer(std::unique_ptr<MemoryBuffer> mb) :
_buffer(mb->getBuffer()) {
> - _sourceManager.AddNewSourceBuffer(mb.release(), llvm::SMLoc());
> + _sourceManager.AddNewSourceBuffer(std::move(mb), llvm::SMLoc());
> }
>
> Token lex();
>
> Modified: lld/trunk/include/lld/ReaderWriter/LinkerScript.h
> URL:
http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/LinkerScript.h?rev=216252&r1=216251&r2=216252&view=diff
>
==============================================================================
> --- lld/trunk/include/lld/ReaderWriter/LinkerScript.h (original)
> +++ lld/trunk/include/lld/ReaderWriter/LinkerScript.h Thu Aug 21 20:13:29
2014
> @@ -58,7 +58,7 @@ class Lexer {
> public:
> explicit Lexer(std::unique_ptr<MemoryBuffer> mb)
> : _buffer(mb->getBuffer()) {
> - _sourceManager.AddNewSourceBuffer(mb.release(), llvm::SMLoc());
> + _sourceManager.AddNewSourceBuffer(std::move(mb), llvm::SMLoc());
> }
>
> void lex(Token &tok);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140821/a82e21fd/attachment.html>
More information about the llvm-commits
mailing list