[Lldb-commits] [lldb] [lldb][DWARF] Do not complete type from declaration die. (PR #91799)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Fri May 10 13:01:29 PDT 2024
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/91799
Fix the problem: https://github.com/llvm/llvm-project/pull/90663#issuecomment-2105164917 by enhancing a double-check for #90663
>From 1f6bf890dbfce07b6ab531597e876ab83cfd1298 Mon Sep 17 00:00:00 2001
From: Zequan Wu <zequanwu at google.com>
Date: Fri, 10 May 2024 16:00:22 -0400
Subject: [PATCH] [lldb][DWARF] Do not complete type from declaration die.
---
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index e0b1b430b266f..315ba4cc0ccdf 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2343,7 +2343,10 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die,
// clang::ExternalASTSource queries for this type.
m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), false);
- if (!die)
+ ParsedDWARFTypeAttributes attrs(die);
+ bool is_forward_declaration = IsForwardDeclaration(
+ die, attrs, SymbolFileDWARF::GetLanguage(*die.GetCU()));
+ if (!die || is_forward_declaration)
return false;
const dw_tag_t tag = die.Tag();
More information about the lldb-commits
mailing list