[Lldb-commits] [lldb] [lldb] Fix GCC's `-Wreturn-type` warnings (PR #127974)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 20 01:26:57 PST 2025
https://github.com/foxtran updated https://github.com/llvm/llvm-project/pull/127974
>From d36ed841386fbc0662d120eefca076df16bdd880 Mon Sep 17 00:00:00 2001
From: "Igor S. Gerasimov" <i.s.ger at ya.ru>
Date: Thu, 20 Feb 2025 10:04:13 +0100
Subject: [PATCH] Fix GCC's -Wreturn-type warning
---
lldb/source/DataFormatters/TypeSummary.cpp | 2 ++
lldb/source/ValueObject/DILLexer.cpp | 2 ++
2 files changed, 4 insertions(+)
diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp
index 2c863b364538f..fa6953a2ee14c 100644
--- a/lldb/source/DataFormatters/TypeSummary.cpp
+++ b/lldb/source/DataFormatters/TypeSummary.cpp
@@ -58,6 +58,8 @@ std::string TypeSummaryImpl::GetSummaryKindName() {
return "c++";
case Kind::eBytecode:
return "bytecode";
+ default:
+ llvm_unreachable("Unknown type kind name");
}
}
diff --git a/lldb/source/ValueObject/DILLexer.cpp b/lldb/source/ValueObject/DILLexer.cpp
index c7acfec347af4..bbb5fafdacbe5 100644
--- a/lldb/source/ValueObject/DILLexer.cpp
+++ b/lldb/source/ValueObject/DILLexer.cpp
@@ -29,6 +29,8 @@ llvm::StringRef Token::GetTokenName(Kind kind) {
return "l_paren";
case Kind::r_paren:
return "r_paren";
+ default:
+ llvm_unreachable("Unknown token name");
}
}
More information about the lldb-commits
mailing list