[Lldb-commits] [PATCH] D119737: [lldb] Add llvm_unreachable in RichManglingContext

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 14 10:12:13 PST 2022


kastiglione created this revision.
kastiglione added a reviewer: JDevlieghere.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Add `llvm_unreachable` to prevent warnings/errors in gcc and msvc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119737

Files:
  lldb/source/Core/RichManglingContext.cpp


Index: lldb/source/Core/RichManglingContext.cpp
===================================================================
--- lldb/source/Core/RichManglingContext.cpp
+++ lldb/source/Core/RichManglingContext.cpp
@@ -123,6 +123,7 @@
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 llvm::StringRef RichManglingContext::ParseFunctionDeclContextName() {
@@ -139,6 +140,7 @@
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 llvm::StringRef RichManglingContext::ParseFullName() {
@@ -156,4 +158,5 @@
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119737.408485.patch
Type: text/x-patch
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220214/c86894b5/attachment.bin>


More information about the lldb-commits mailing list