summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-09-17 06:32:48 +0000
committerJustin Bogner <mail@justinbogner.com>2014-09-17 06:32:48 +0000
commit99e9518751b837d3f073d30155aacdbc8fa0a3c1 (patch)
treeb987e9ec33ae90f448f67cff0314da054c630234 /llvm/tools/llvm-cov
parent5e1400a81c45418879776924518f1ff4843f8dd4 (diff)
downloadbcm5719-llvm-99e9518751b837d3f073d30155aacdbc8fa0a3c1.tar.gz
bcm5719-llvm-99e9518751b837d3f073d30155aacdbc8fa0a3c1.zip
Add move constructors/assignment to make MSVC happy after r217940
llvm-svn: 217941
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index af44085cffc..80669d37f76 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -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) {
OpenPOWER on IntegriCloud