[llvm] r217941 - Add move constructors/assignment to make MSVC happy after r217940
Justin Bogner
mail at justinbogner.com
Tue Sep 16 23:32:49 PDT 2014
Author: bogner
Date: Wed Sep 17 01:32:48 2014
New Revision: 217941
URL: http://llvm.org/viewvc/llvm-project?rev=217941&view=rev
Log:
Add move constructors/assignment to make MSVC happy after r217940
Modified:
llvm/trunk/tools/llvm-cov/SourceCoverageView.h
Modified: llvm/trunk/tools/llvm-cov/SourceCoverageView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/SourceCoverageView.h?rev=217941&r1=217940&r2=217941&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageView.h (original)
+++ llvm/trunk/tools/llvm-cov/SourceCoverageView.h Wed Sep 17 01:32:48 2014
@@ -32,6 +32,13 @@ struct ExpansionView {
ExpansionView(const coverage::CounterMappingRegion &Region,
std::unique_ptr<SourceCoverageView> View)
: Region(Region), View(std::move(View)) {}
+ ExpansionView(ExpansionView &&RHS)
+ : Region(std::move(RHS.Region)), View(std::move(RHS.View)) {}
+ ExpansionView &operator=(ExpansionView &&RHS) {
+ Region = std::move(RHS.Region);
+ View = std::move(RHS.View);
+ return *this;
+ }
unsigned getLine() const { return Region.LineStart; }
unsigned getStartCol() const { return Region.ColumnStart; }
@@ -51,6 +58,15 @@ struct InstantiationView {
InstantiationView(StringRef FunctionName, unsigned Line,
std::unique_ptr<SourceCoverageView> View)
: FunctionName(FunctionName), Line(Line), View(std::move(View)) {}
+ InstantiationView(InstantiationView &&RHS)
+ : FunctionName(std::move(RHS.FunctionName)), Line(std::move(RHS.Line)),
+ View(std::move(RHS.View)) {}
+ InstantiationView &operator=(InstantiationView &&RHS) {
+ FunctionName = std::move(RHS.FunctionName);
+ Line = std::move(RHS.Line);
+ View = std::move(RHS.View);
+ return *this;
+ }
friend bool operator<(const InstantiationView &LHS,
const InstantiationView &RHS) {
More information about the llvm-commits
mailing list