Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# 9fc54c0e 17-Dec-2024 Michael Buch <michaelbuch12@gmail.com>

[clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (#120154)

In Objective-C, forward declarations are currently represented as:
```
DW_TAG_structure_type
DW_AT_name

[clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (#120154)

In Objective-C, forward declarations are currently represented as:
```
DW_TAG_structure_type
DW_AT_name ("Foo")
DW_AT_declaration (true)
DW_AT_APPLE_runtime_class (DW_LANG_ObjC)
```
However, when compiling with `-gmodules`, when a class definition is
turned into a forward declaration within a `DW_TAG_module`, the DIE for
the forward declaration looks as follows:
```
DW_TAG_structure_type
DW_AT_name ("Foo")
DW_AT_declaration (true)
```

Note the absence of `DW_AT_APPLE_runtime_class`. With recent changes in
LLDB, not being able to differentiate between C++ and Objective-C
forward declarations has become problematic (see attached test-case and
explanation in https://github.com/llvm/llvm-project/pull/119860).

show more ...