mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 15:41:35 +08:00
[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:
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user