[Lldb-commits] [lldb] f20f9f5 - [lldb] Add llvm_unreachable in RichManglingContext

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 18 08:38:16 PST 2022


Author: Dave Lee
Date: 2022-02-18T08:38:03-08:00
New Revision: f20f9f5a32c02e7df3fc9a9d48643471dc6d41a5

URL: https://github.com/llvm/llvm-project/commit/f20f9f5a32c02e7df3fc9a9d48643471dc6d41a5
DIFF: https://github.com/llvm/llvm-project/commit/f20f9f5a32c02e7df3fc9a9d48643471dc6d41a5.diff

LOG: [lldb] Add llvm_unreachable in RichManglingContext

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

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

Added: 
    

Modified: 
    lldb/source/Core/RichManglingContext.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/RichManglingContext.cpp b/lldb/source/Core/RichManglingContext.cpp
index f1e81be417b0e..64b18b401f2d6 100644
--- a/lldb/source/Core/RichManglingContext.cpp
+++ b/lldb/source/Core/RichManglingContext.cpp
@@ -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!");
 }


        


More information about the lldb-commits mailing list