[Lldb-commits] [lldb] [lldb][DWARFASTParserClang][NFC] Clarify comment around static member variable handling (PR #72495)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 16 00:47:30 PST 2023


https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/72495

None

>From cf66beffe36e53fed5740775fa50b767a62f2c50 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 16 Nov 2023 08:46:37 +0000
Subject: [PATCH] [lldb][DWARFASTParserClang][NFC] Clarify comment around
 static member variable handling

---
 lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 37efe70461977ad..abe3c673e2cce69 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2963,9 +2963,9 @@ void DWARFASTParserClang::ParseSingleMember(
   // whereas GCC emits it only for static data members if not part of an
   // anonymous namespace. The flag that is consistently emitted for static
   // data members is DW_AT_declaration, so we check it instead.
-  // FIXME: Since DWARFv5, static data members are marked DW_AT_variable so we
+  // The following block is only necessary to support DWARFv4 and earlier.
+  // Starting with DWARFv5, static data members are marked DW_AT_variable so we
   // can consistently detect them on both GCC and Clang without below heuristic.
-  // Remove this block if we ever drop DWARFv4 support.
   if (attrs.member_byte_offset == UINT32_MAX &&
       attrs.data_bit_offset == UINT64_MAX && attrs.is_declaration) {
     CreateStaticMemberVariable(die, attrs, class_clang_type);



More information about the lldb-commits mailing list