diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h index 53ebec1eb3a54..5da6076c27390 100644 --- a/llvm/include/llvm/ADT/StringSwitch.h +++ b/llvm/include/llvm/ADT/StringSwitch.h @@ -158,7 +158,7 @@ class StringSwitch { StringSwitch &EndsWithLower(StringLiteral S, T Value) { if (!Result && Str.ends_with_insensitive(S)) - Result = Value; + Result = std::move(Value); return *this; }