[Lldb-commits] [lldb] [lldb] Don't apply the MS inheritance model to non-CXXRecordDecl DWARF types (PR #216711)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 17 05:36:55 PDT 2026
================
@@ -2244,8 +2244,10 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,
// DWARF doesn't have the attribute, but we can infer the value the same way
// as Clang Sema does. It's required to calculate the size of pointers to
- // member functions of this type.
- if (m_ast.getASTContext().getTargetInfo().getCXXABI().isMicrosoft()) {
+ // member functions of this type. Objective-C interface types reach this
+ // point too but are not CXXRecordDecls, so record_decl may be null here.
+ if (record_decl &&
----------------
Michael137 wrote:
I think we can just early return above:
```
if (!record_decl)
return clang_type.IsValid();
```
The `contained_type_dies` are only relevant for C++ classes (objective-c doesn't have nested classes AFAIK). It's something that was added not too long ago, without objective-c in mind.
https://github.com/llvm/llvm-project/pull/216711
More information about the lldb-commits
mailing list