diff --git a/include/llvm/ADT/StringSwitch.h b/include/llvm/ADT/StringSwitch.h index ebdcbeae8e1..bd200fc7c11 100644 --- a/include/llvm/ADT/StringSwitch.h +++ b/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