summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2016-07-25 20:34:25 +0000
committerJordan Rose <jordan_rose@apple.com>2016-07-25 20:34:25 +0000
commit10697a7c34e27a82efdffb3b29254ffc9309704f (patch)
tree57c648a72b5b70653b4aac144763625a17435386 /llvm
parenta4c2efb60db9284fd5b7b5b42f72077c6a5ffb54 (diff)
downloadbcm5719-llvm-10697a7c34e27a82efdffb3b29254ffc9309704f.tar.gz
bcm5719-llvm-10697a7c34e27a82efdffb3b29254ffc9309704f.zip
Fix r276671 to not use a defaulted move constructor.
MSVC won't provide the body of this move constructor and assignment operator, possibly because the copy constructor is banned. Just write it manually. llvm-svn: 276685
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/StringSwitch.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h
index ebdcbeae8e1..bd200fc7c11 100644
--- a/llvm/include/llvm/ADT/StringSwitch.h
+++ b/llvm/include/llvm/ADT/StringSwitch.h
@@ -55,9 +55,17 @@ public:
// StringSwitch is not copyable.
StringSwitch(const StringSwitch &) = delete;
- StringSwitch(StringSwitch &&) = default;
void operator=(const StringSwitch &) = delete;
- StringSwitch &operator=(StringSwitch &&) = default;
+
+ StringSwitch(StringSwitch &&other) {
+ *this = std::move(other);
+ }
+ StringSwitch &operator=(StringSwitch &&other) {
+ Str = other.Str;
+ Result = other.Result;
+ return *this;
+ }
+
~StringSwitch() = default;
template<unsigned N>
OpenPOWER on IntegriCloud