https://github.com/da-viper created https://github.com/llvm/llvm-project/pull/175545
Return UINT32_MAX instead of 0 when SBSymbol has no underlying symbol, since 0 is a valid symbol ID. This makes it possible to distinguish between a valid symbol with ID 0 and an invalid/uninitialised symbol. >From https://github.com/llvm/llvm-project/pull/172687#discussion_r2628319927 >From aeb644259040d96e18a43afe2e59f697182672d6 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Mon, 12 Jan 2026 14:13:59 +0000 Subject: [PATCH] [lldb] Change SBSymbol::GetID() to return UINT32_MAX for invalid symbols Return UINT32_MAX instead of 0 when SBSymbol has no underlying symbol, since 0 is a valid symbol ID. This makes it possible to distinguish between a valid symbol with ID 0 and an invalid/uninitialized symbol. >From https://github.com/llvm/llvm-project/pull/172687#discussion_r2628319927 --- lldb/source/API/SBSymbol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp index fd68a3820181d..73f082ebde6a3 100644 --- a/lldb/source/API/SBSymbol.cpp +++ b/lldb/source/API/SBSymbol.cpp @@ -207,7 +207,7 @@ uint32_t SBSymbol::GetID() const { if (m_opaque_ptr) return m_opaque_ptr->GetID(); - return 0; + return UINT32_MAX; } bool SBSymbol::IsExternal() { _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
