================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to