[lldb] Add llvm_unreachable in RichManglingContext
authorDave Lee <davelee.com@gmail.com>
Mon, 14 Feb 2022 18:11:29 +0000 (10:11 -0800)
committerDave Lee <davelee.com@gmail.com>
Fri, 18 Feb 2022 16:38:03 +0000 (08:38 -0800)
Add `llvm_unreachable` to prevent warnings/errors in gcc and msvc.

Differential Revision: https://reviews.llvm.org/D119737

lldb/source/Core/RichManglingContext.cpp

index f1e81be..64b18b4 100644 (file)
@@ -123,6 +123,7 @@ llvm::StringRef RichManglingContext::ParseFunctionBaseName() {
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 llvm::StringRef RichManglingContext::ParseFunctionDeclContextName() {
@@ -139,6 +140,7 @@ llvm::StringRef RichManglingContext::ParseFunctionDeclContextName() {
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }
 
 llvm::StringRef RichManglingContext::ParseFullName() {
@@ -156,4 +158,5 @@ llvm::StringRef RichManglingContext::ParseFullName() {
   case None:
     return {};
   }
+  llvm_unreachable("Fully covered switch above!");
 }