From 10431e12b91850a27c7853c5a04e89ff8e96fd17 Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Tue, 14 Oct 2025 09:44:05 -0400 Subject: [PATCH] [ADT] Clean up StringSwitch class. NFC. --- llvm/include/llvm/ADT/StringSwitch.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h index a96535cd077fd..1bb07e39bcaa5 100644 --- a/llvm/include/llvm/ADT/StringSwitch.h +++ b/llvm/include/llvm/ADT/StringSwitch.h @@ -54,17 +54,14 @@ class StringSwitch { explicit StringSwitch(StringRef S) : Str(S), Result() { } + StringSwitch(StringSwitch &&) = default; + // StringSwitch is not copyable. StringSwitch(const StringSwitch &) = delete; // StringSwitch is not assignable due to 'Str' being 'const'. void operator=(const StringSwitch &) = delete; - void operator=(StringSwitch &&other) = delete; - - StringSwitch(StringSwitch &&other) - : Str(other.Str), Result(std::move(other.Result)) { } - - ~StringSwitch() = default; + void operator=(StringSwitch &&) = delete; // Case-sensitive case matchers StringSwitch &Case(StringLiteral S, T Value) {