Skip to content

Commit 932a7d6

Browse files
authored
[ADT] Clean up StringSwitch class. NFC. (#163396)
1 parent 5fa41f0 commit 932a7d6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/include/llvm/ADT/StringSwitch.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,14 @@ class StringSwitch {
5454
explicit StringSwitch(StringRef S)
5555
: Str(S), Result() { }
5656

57+
StringSwitch(StringSwitch &&) = default;
58+
5759
// StringSwitch is not copyable.
5860
StringSwitch(const StringSwitch &) = delete;
5961

6062
// StringSwitch is not assignable due to 'Str' being 'const'.
6163
void operator=(const StringSwitch &) = delete;
62-
void operator=(StringSwitch &&other) = delete;
63-
64-
StringSwitch(StringSwitch &&other)
65-
: Str(other.Str), Result(std::move(other.Result)) { }
66-
67-
~StringSwitch() = default;
64+
void operator=(StringSwitch &&) = delete;
6865

6966
// Case-sensitive case matchers
7067
StringSwitch &Case(StringLiteral S, T Value) {

0 commit comments

Comments
 (0)