[lld] r216252 - Fix build after r216223: Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using std::unique_ptr
Hans Wennborg
hans at hanshq.net
Thu Aug 21 18:13:30 PDT 2014
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
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);
More information about the llvm-commits
mailing list