[lldb] Silence GCC warnings about missing returns after fully covered switches. NFC.

This silences warnings like this:

lldb/source/Core/DebuggerEvents.cpp: In member function ‘llvm::StringRef lldb_private::DiagnosticEventData::GetPrefix() const’:
lldb/source/Core/DebuggerEvents.cpp:55:1: warning: control reaches end of non-void function [-Wreturn-type]
   55 | }

Differential Revision: https://reviews.llvm.org/D123203
This commit is contained in:
Martin Storsjö 2022-04-06 14:09:22 +03:00
parent e546bbfda0
commit ae2aa2d21b
3 changed files with 3 additions and 0 deletions

View File

@ -1026,6 +1026,7 @@ const char *Breakpoint::BreakpointEventTypeAsCString(BreakpointEventType type) {
case eBreakpointEventTypeThreadChanged: return "thread changed";
case eBreakpointEventTypeAutoContinueChanged: return "autocontinue changed";
};
llvm_unreachable("Fully covered switch above!");
}
Log *Breakpoint::BreakpointEventData::GetLogChannel() {

View File

@ -52,6 +52,7 @@ llvm::StringRef DiagnosticEventData::GetPrefix() const {
case Type::Error:
return "error";
}
llvm_unreachable("Fully covered switch above!");
}
void DiagnosticEventData::Dump(Stream *s) const {

View File

@ -102,6 +102,7 @@ static Expected<uint32_t> ReadIntelPTConfigFile(const char *file,
case BitOffset:
return 10;
}
llvm_unreachable("Fully covered switch above!");
};
auto createError = [&](const char *expected_value_message) {