[llvm-commits] [lld] r172896 - /lld/trunk/include/lld/Driver/LinkerOptions.h

Chandler Carruth chandlerc at gmail.com
Sat Jan 19 01:38:14 PST 2013


Author: chandlerc
Date: Sat Jan 19 03:38:14 2013
New Revision: 172896

URL: http://llvm.org/viewvc/llvm-project?rev=172896&view=rev
Log:
Fix the build with libstdc++ v4.6 on Linux by supplying an explicit move
assignment operator. There is an issue where classes with deleted copy
constructors and user defined move constructors end up with an
implicitly deleted copy constructor that is selected instead of the
implicit move constructor. This is a bit of a hack, but it allows me to
build LLD in a bootstrap with libstdc++ which is my primary goal.

Modified:
    lld/trunk/include/lld/Driver/LinkerOptions.h

Modified: lld/trunk/include/lld/Driver/LinkerOptions.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/LinkerOptions.h?rev=172896&r1=172895&r2=172896&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/LinkerOptions.h (original)
+++ lld/trunk/include/lld/Driver/LinkerOptions.h Sat Jan 19 03:38:14 2013
@@ -56,6 +56,13 @@
     , _file(std::move(other._file))
     , _kind(other._kind) {}
 
+  LinkerInput &operator=(LinkerInput &&rhs) {
+    _buffer = std::move(rhs._buffer);
+    _file = std::move(rhs._file);
+    _kind = rhs._kind;
+    return *this;
+  }
+
   ErrorOr<llvm::MemoryBuffer&> getBuffer() const {
     if (!_buffer) {
       llvm::OwningPtr<llvm::MemoryBuffer> buf;





More information about the llvm-commits mailing list