[Lldb-commits] [PATCH] D123203: [lldb] Silence GCC warnings about missing returns after fully covered switches. NFC.

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 6 12:50:51 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGae2aa2d21b24: [lldb] Silence GCC warnings about missing returns after fully covered switches. (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123203/new/

https://reviews.llvm.org/D123203

Files:
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Core/DebuggerEvents.cpp
  lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp


Index: lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp
===================================================================
--- lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp
+++ lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp
@@ -102,6 +102,7 @@
     case BitOffset:
       return 10;
     }
+    llvm_unreachable("Fully covered switch above!");
   };
 
   auto createError = [&](const char *expected_value_message) {
Index: lldb/source/Core/DebuggerEvents.cpp
===================================================================
--- lldb/source/Core/DebuggerEvents.cpp
+++ lldb/source/Core/DebuggerEvents.cpp
@@ -52,6 +52,7 @@
   case Type::Error:
     return "error";
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 void DiagnosticEventData::Dump(Stream *s) const {
Index: lldb/source/Breakpoint/Breakpoint.cpp
===================================================================
--- lldb/source/Breakpoint/Breakpoint.cpp
+++ lldb/source/Breakpoint/Breakpoint.cpp
@@ -1026,6 +1026,7 @@
     case eBreakpointEventTypeThreadChanged: return "thread changed";
     case eBreakpointEventTypeAutoContinueChanged: return "autocontinue changed";
   };
+  llvm_unreachable("Fully covered switch above!");
 }
 
 Log *Breakpoint::BreakpointEventData::GetLogChannel() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123203.420982.patch
Type: text/x-patch
Size: 1295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220406/443bc84b/attachment-0001.bin>


More information about the lldb-commits mailing list