Skip to content

Commit

Permalink
Add an explicit move constructor to SrcBuffer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rnk committed Aug 21, 2014
1 parent 5e34dff commit a79efd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/llvm/Support/SourceMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class SourceMgr {

/// 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.
Expand Down

0 comments on commit a79efd7

Please sign in to comment.