================
@@ -2995,20 +2995,21 @@ llvm::DIType *CGDebugInfo::CreateType(const
ObjCInterfaceType *Ty,
if (!ID)
return nullptr;
+ auto RuntimeLang =
+ static_cast<llvm::dwarf::SourceLanguage>(TheCU->getSourceLanguage());
+
// Return a forward declaration if this type was imported from a clang
module,
// and this is not the compile unit with the implementation of the type
(which
// may contain hidden ivars).
if (DebugTypeExtRefs && ID->isFromASTFile() && ID->getDefinition() &&
!ID->getImplementation())
- return DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
- ID->getName(),
- getDeclContextDescriptor(ID), Unit, 0);
+ return DBuilder.createForwardDecl(
+ llvm::dwarf::DW_TAG_structure_type, ID->getName(),
+ getDeclContextDescriptor(ID), Unit, 0, RuntimeLang);
----------------
adrian-prantl wrote:
Two things:
1. Shouldn't we do this only for ObjC class types?
2. Shouldn't — even in an ObjC++ CU — the runtimelang on an ObjC class be ObjC?
https://github.com/llvm/llvm-project/pull/120154
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits