From 0180055bdccaf08457f2018acb013d4e3027926c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 17 Oct 2020 12:59:52 -0700 Subject: [PATCH] TypeSystem: silence some errors identified by MSVC Silence a few cases where MSVC complains about not all paths returning a value. Avoid adding a default case to allow for catching covered switches. --- lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index 3d3b26a401642..9ab13d403b881 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -1265,6 +1265,7 @@ static const char *getImportFailureString(swift::serialization::Status status) { return "The module file was built for a target newer than the current " "target."; } + llvm_unreachable("covered switch"); } /// Initialize the compiler invocation with it the search paths from a @@ -2991,6 +2992,7 @@ class SwiftDWARFImporterDelegate : public swift::DWARFImporterDelegate { // described in DWARF. return true; } + llvm_unreachable("covered switch"); } clang::Decl *GetDeclForTypeAndKind(clang::QualType qual_type,