mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
DebugInfo: Emit definitions for types with no members.
The absence of members was a poor/incorrect proxy for "is definition". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -980,16 +980,12 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
||||
case dwarf::DW_TAG_structure_type:
|
||||
case dwarf::DW_TAG_union_type:
|
||||
case dwarf::DW_TAG_class_type: {
|
||||
// Add elements to structure type.
|
||||
DIArray Elements = CTy.getTypeArray();
|
||||
|
||||
// A forward struct declared type may not have elements available.
|
||||
unsigned N = Elements.getNumElements();
|
||||
if (N == 0)
|
||||
if (CTy.isForwardDecl())
|
||||
break;
|
||||
|
||||
// Add elements to structure type.
|
||||
for (unsigned i = 0; i < N; ++i) {
|
||||
DIArray Elements = CTy.getTypeArray();
|
||||
for (unsigned i = 0, N = Elements.getNumElements(); i < N; ++i) {
|
||||
DIDescriptor Element = Elements.getElement(i);
|
||||
DIE *ElemDie = NULL;
|
||||
if (Element.isSubprogram()) {
|
||||
|
Reference in New Issue
Block a user