Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions llvm/include/llvm/ADT/StringSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down