summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Analysis/StratifiedSets.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/StratifiedSets.h b/llvm/lib/Analysis/StratifiedSets.h
index 85503131ad8..d4cdbdb4fb1 100644
--- a/llvm/lib/Analysis/StratifiedSets.h
+++ b/llvm/lib/Analysis/StratifiedSets.h
@@ -97,14 +97,19 @@ public:
// If we have a need to copy these at some point, it's fine to default this.
// At the time of writing, copying StratifiedSets is always a perf bug.
StratifiedSets(const StratifiedSets &) = delete;
- StratifiedSets(StratifiedSets &&Other) = default;
+
+ // Can't default these due to compile errors in MSVC2013
+ StratifiedSets(StratifiedSets &&Other) { *this = std::move(Other); }
+ StratifiedSets &operator=(StratifiedSets &&Other) {
+ Values = std::move(Other.Values);
+ Links = std::move(Other.Links);
+ return *this;
+ }
StratifiedSets(DenseMap<T, StratifiedInfo> Map,
std::vector<StratifiedLink> Links)
: Values(std::move(Map)), Links(std::move(Links)) {}
- StratifiedSets &operator=(StratifiedSets<T> &&Other) = default;
-
Optional<StratifiedInfo> find(const T &Elem) const {
auto Iter = Values.find(Elem);
if (Iter == Values.end())
OpenPOWER on IntegriCloud