Add an explicit move constructor to SrcBuffer
authorReid Kleckner <reid@kleckner.net>
Thu, 21 Aug 2014 23:24:08 +0000 (23:24 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 21 Aug 2014 23:24:08 +0000 (23:24 +0000)
MSVC can't synthesize the explicit one.  Instead it tries to emit a copy
ctor which would call the deleted copy ctor of unique_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216244 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/SourceMgr.h

index 19dad6b6ac5366470ac2e586d413f1cb9406dbff..f9e114b67cb44f4629882179386fcc22570604c2 100644 (file)
@@ -51,6 +51,11 @@ private:
 
     /// This is the location of the parent include, or null if at the top level.
     SMLoc IncludeLoc;
+
+    SrcBuffer() {}
+
+    SrcBuffer(SrcBuffer &&O)
+        : Buffer(std::move(O.Buffer)), IncludeLoc(O.IncludeLoc) {}
   };
 
   /// This is all of the buffers that we are reading from.